Created
April 18, 2018 08:06
-
-
Save ahelland/2e6ca83e675e2c0d286c312a255dc6c7 to your computer and use it in GitHub Desktop.
Dockerfile for api-playground referred to in "Building Microservices with AKS and VSTS — Part 4"
This file contains hidden or 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 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/aspnetcore:2.0 | |
WORKDIR /app | |
COPY --from=build-env /app/out . | |
ENTRYPOINT ["dotnet", "API-Playground.dll"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment