Created
August 15, 2020 19:21
-
-
Save kyle-morton/c917bdfb027b1c7818e980361aa67b53 to your computer and use it in GitHub Desktop.
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/core/aspnet:3.1-nanoserver-1909 AS base | |
WORKDIR /app | |
EXPOSE 5000 | |
FROM mcr.microsoft.com/dotnet/core/sdk:3.1-nanoserver-1909 AS build | |
WORKDIR /src | |
COPY ["docker-mvc.csproj", "./"] | |
RUN dotnet restore "./docker-mvc.csproj" | |
COPY . . | |
WORKDIR "/src/." | |
RUN dotnet build "docker-mvc.csproj" -c Release -o /app/build | |
FROM build AS publish | |
RUN dotnet publish "docker-mvc.csproj" -c Release -o /app/publish | |
FROM base AS final | |
WORKDIR /app | |
COPY --from=publish /app/publish . | |
ENTRYPOINT ["dotnet", "docker-mvc.dll"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment