Last active
November 24, 2017 08:46
-
-
Save radu-matei/938cd7cacb4b3239af320abad3625137 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 microsoft/dotnet-nightly:2.1-sdk AS build-env | |
WORKDIR /app | |
# copy csproj and restore as distinct layers | |
COPY nuget.config ./ | |
COPY *.csproj ./ | |
RUN dotnet restore | |
# copy everything else and build | |
COPY . ./ | |
RUN dotnet publish -c Release -r linux-x64 -o out | |
# build runtime image | |
FROM microsoft/dotnet-nightly:2.1-runtime-deps-alpine | |
WORKDIR /app | |
COPY --from=build-env /app/out ./ | |
ENTRYPOINT ["./dotnetapp"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment