Created
August 24, 2018 08:05
-
-
Save PradeepLoganathan/08aed75678bf0c105d19ac5a2432cd0b to your computer and use it in GitHub Desktop.
Simple dockerfile for a console application
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:2.1-runtime AS base | |
WORKDIR /app | |
FROM microsoft/dotnet:2.1-sdk AS build | |
WORKDIR /src | |
COPY thetime/thetime.csproj thetime/ | |
RUN dotnet restore thetime/thetime.csproj | |
COPY . . | |
WORKDIR /src/thetime | |
RUN dotnet build thetime.csproj -c Release -o /app | |
FROM build AS publish | |
RUN dotnet publish thetime.csproj -c Release -o /app | |
FROM base AS final | |
WORKDIR /app | |
COPY --from=publish /app . | |
ENTRYPOINT ["dotnet", "thetime.dll"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment