Created
August 25, 2023 17:29
-
-
Save EmpeRoar/24884b88016b5a77f98b256150db08f6 to your computer and use it in GitHub Desktop.
dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base | |
WORKDIR /app | |
EXPOSE 80 | |
EXPOSE 443 | |
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build | |
WORKDIR /src | |
COPY ["bank.csproj", ""] | |
RUN dotnet restore "bank.csproj" | |
COPY . . | |
WORKDIR "/src" | |
RUN dotnet build "bank.csproj" -c Release -o /app/build | |
FROM build AS publish | |
RUN dotnet publish "bank.csproj" -c Release -o /app/publish /p:UseAppHost=false | |
FROM base AS final | |
WORKDIR /app | |
COPY --from=publish /app/publish . | |
ENTRYPOINT ["dotnet", "bank.dll"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment