Skip to content

Commit

Permalink
Added Dockerfile.
Browse files Browse the repository at this point in the history
  • Loading branch information
richard-churchman committed Apr 21, 2024
1 parent 0a7d999 commit f667cbc
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FROM mcr.microsoft.com/dotnet/aspnet:8.0-alpine AS base

WORKDIR /app
EXPOSE 80
EXPOSE 443

FROM mcr.microsoft.com/dotnet/sdk:6.0-alpine AS build
WORKDIR /
COPY ["Jube.App/Jube.App.csproj", "Jube.App/"]
COPY . .
RUN dotnet restore "Jube.App/Jube.App.csproj"
WORKDIR "/Jube.App"
RUN dotnet build "Jube.App.csproj" -c Release -o /app/build

FROM build AS publish
RUN dotnet publish "Jube.App.csproj" -c Release -o /app/publish

FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .

ENTRYPOINT ["dotnet", "Jube.App.dll"]

0 comments on commit f667cbc

Please sign in to comment.