Skip to content

Instantly share code, notes, and snippets.

Last active August 17, 2019 16:24
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
FROM microsoft/dotnet:2.2-sdk AS build-env
# Copy csproj and restore as distinct layers
COPY *.csproj ./
RUN dotnet restore
# Copy everything else and build
COPY . ./
RUN dotnet publish -c Release -o out
# Build runtime image
FROM microsoft/dotnet:2.2-aspnetcore-runtime
COPY --from=build-env /app/out .
CMD dotnet AspNetCoreHerokuDocker.dll
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment