Created
March 23, 2019 16:03
-
-
Save coderoffortune/3eb98cb3b7ee874d4559fd9c5ed8c554 to your computer and use it in GitHub Desktop.
Simple Dockerfile for dotnet core
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/sdk:2.1 AS builder | |
WORKDIR /build | |
COPY dotnetapp.csproj . | |
RUN dotnet restore | |
COPY . . | |
RUN dotnet publish -c Release -o out | |
FROM mcr.microsoft.com/dotnet/core/aspnet:2.1 | |
WORKDIR /app | |
COPY --from=builder /build/out . | |
EXPOSE 5000/tcp | |
CMD ["dotnet", "dotnetapp.dll"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment