Created
June 4, 2018 07:31
-
-
Save MauriRojas/20857dd06d84fdd14ae6919532621ff7 to your computer and use it in GitHub Desktop.
Dockerfile for an ASP.NET Core web app
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 microsoft/aspnetcore-build:2.0 AS build-env | |
WORKDIR /app | |
COPY *.csproj ./ | |
RUN dotnet restore | |
COPY . ./ | |
RUN dotnet publish -c Release -o out | |
FROM microsoft/aspnetcore-build:2.0 | |
WORKDIR /app | |
COPY --from=build-env /app/out . | |
ENTRYPOINT ["dotnet", "aspnetcoreapp.dll"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment