Skip to content

Instantly share code, notes, and snippets.

@xximjasonxx
Created July 27, 2019 15:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xximjasonxx/be31966d58a060ad2b7e41a2f0c34df4 to your computer and use it in GitHub Desktop.
Save xximjasonxx/be31966d58a060ad2b7e41a2f0c34df4 to your computer and use it in GitHub Desktop.
FROM mcr.microsoft.com/dotnet/core/sdk:2.2.203 as build
WORKDIR /code
COPY . .
RUN dotnet restore
RUN dotnet publish -o output -c Release --no-restore
FROM mcr.microsoft.com/dotnet/core/aspnet:2.2 as runtime
WORKDIR /app
COPY --from=build /code/output ./
EXPOSE 8081
EXPOSE 443
ENTRYPOINT [ "dotnet", "CalcApi.dll" ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment