Create a gist now

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Smarter ASP.NET Core Docker File
FROM microsoft/dotnet:2.0-sdk as builder
RUN mkdir -p /root/src/app/aspnetcoreapp
WORKDIR /root/src/app/aspnetcoreapp
#copy just the project file over
# this prevents additional extraneous restores
# and allows us to resuse the intermediate layer
# This only happens again if we change the csproj.
# This means WAY faster builds!
COPY aspnetcoreapp.csproj .
#Because we have a custom one
COPY nuget.config .
RUN dotnet restore ./aspnetcoreapp.csproj
COPY . .
RUN dotnet publish -c release -o published -r linux-arm
#Smaller - Best for apps with self-contained .NETs, as it doesn't include the runtime
FROM microsoft/dotnet:2.0.0-runtime-deps-stretch-arm32v7
#Bigger - Best for apps .NETs that aren't self-contained.
#FROM microsoft/dotnet:2.0.0-runtime-stretch-arm32v7
#FROM microsoft/dotnet:2.0.0-runtime-deps
#FROM microsoft/dotnet:2.0.0-runtime
WORKDIR /root/
COPY --from=builder /root/src/app/aspnetcoreapp/published .
ENV ASPNETCORE_URLS=http://+:5000
EXPOSE 5000/tcp
#CMD ["dotnet", "./aspnetcoreapp.dll"]
CMD ["./aspnetcoreapp"]
@Rodney91

This comment has been minimized.

Show comment
Hide comment
@Rodney91

Rodney91 Jul 23, 2018

I think the two controllers are supported from specific supplies, they may require diode on the control yields, with the objective that the structures are really self-sufficient straight up to the point where the banner goes to the customer's control input terminal. However, I try to know about www.aussiewritingreviews.com but this will be sound for the people who interested in Asp.net coding.

I think the two controllers are supported from specific supplies, they may require diode on the control yields, with the objective that the structures are really self-sufficient straight up to the point where the banner goes to the customer's control input terminal. However, I try to know about www.aussiewritingreviews.com but this will be sound for the people who interested in Asp.net coding.

@dia2021

This comment has been minimized.

Show comment
Hide comment
@dia2021

dia2021 Aug 10, 2018

Thanks for sharing code I am not more familier with Asp.net but this one is good for us . that you provide information on this kind of Big Platform , I am running my own Design Agency in Lebanon But i am working on PHP and Its Relevant Open Sources Like Wordpress , Joomla , Magento , Shopify Etc.... Get more Details of Work : http://www.beirutescortservice.com/ Or http://www.missbeirutescorts.com/

dia2021 commented Aug 10, 2018

Thanks for sharing code I am not more familier with Asp.net but this one is good for us . that you provide information on this kind of Big Platform , I am running my own Design Agency in Lebanon But i am working on PHP and Its Relevant Open Sources Like Wordpress , Joomla , Magento , Shopify Etc.... Get more Details of Work : http://www.beirutescortservice.com/ Or http://www.missbeirutescorts.com/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment