Created
August 17, 2019 16:30
-
-
Save namhnz/7d3c9b973d8a300ce2c805831e18f561 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 http://blog.federicosilva.net/, updated to support dotnet core 2.2 | |
# reference from https://codingblast.com/hosting-asp-net-core-on-heroku-with-dockercircleci-for-free/ | |
# build image | |
FROM microsoft/dotnet:2.2-sdk AS build | |
WORKDIR /app | |
COPY *.csproj ./ | |
RUN dotnet restore | |
COPY . ./ | |
RUN dotnet publish -c Release -o out | |
# runtime image | |
FROM microsoft/dotnet:2.2-aspnetcore-runtime | |
ENV PORT=5000 | |
WORKDIR /app | |
COPY --from=build /app/out . | |
CMD ASPNETCORE_URLS=http://*:$PORT dotnet Daycare.dll |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment