Create a gist now

Instantly share code, notes, and snippets.

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"]
@chapters1

This comment has been minimized.

Show comment Hide comment
@chapters1

chapters1 Apr 4, 2018

Thank you for another fantastic blog. Where else might one get that sort of knowledge written in such a perfect way? I actually have a presentation that i’m presently acting on, and i are yearning for such info instead. بهترین وکیل ملکی
Thank you for another fantastic blog. Where else might one get that sort of knowledge written in such a perfect way? I actually have a presentation that i’m presently acting on, and i are yearning for such info instead. بهترین وکیل ملکی
@chapters1

This comment has been minimized.

Show comment Hide comment
@chapters1

chapters1 Apr 5, 2018

It was any exhilaration discovering your website yesterday. I arrived here nowadays hunting new things. I was not necessarily frustrated. Your ideas after new approaches on this thing have been helpful plus an superb assistance to personally. We appreciate you leaving out time to write out these items and then for revealing your thoughts. telugu cinema news
It was any exhilaration discovering your website yesterday. I arrived here nowadays hunting new things. I was not necessarily frustrated. Your ideas after new approaches on this thing have been helpful plus an superb assistance to personally. We appreciate you leaving out time to write out these items and then for revealing your thoughts. telugu cinema news
@chapters1

This comment has been minimized.

Show comment Hide comment
@chapters1

chapters1 Apr 8, 2018

i adore perusing this article so beautiful!!great work! usa escorts
i adore perusing this article so beautiful!!great work! usa escorts
@chapters1

This comment has been minimized.

Show comment Hide comment
@chapters1

chapters1 Apr 9, 2018

That’s not me not used to blogging and actually value internet site. You can find much innovative content that peaks my interest. Let me bookmark your website whilst checking you out of trouble. بهترین وکیل ملکی
That’s not me not used to blogging and actually value internet site. You can find much innovative content that peaks my interest. Let me bookmark your website whilst checking you out of trouble. بهترین وکیل ملکی
@chapters1

This comment has been minimized.

Show comment Hide comment
@chapters1

chapters1 Apr 17, 2018

What i do not understood is in reality how you’re not actually a lot more neatly-appreciated than you might be now. You are so intelligent. You realize therefore significantly in relation to this matter, produced me individually imagine it from so many numerous angles. Its like men and women are not involved until it is something to accomplish with Lady gaga! Your own stuffs outstanding. All the time care for it up! godrej 106
What i do not understood is in reality how you’re not actually a lot more neatly-appreciated than you might be now. You are so intelligent. You realize therefore significantly in relation to this matter, produced me individually imagine it from so many numerous angles. Its like men and women are not involved until it is something to accomplish with Lady gaga! Your own stuffs outstanding. All the time care for it up! godrej 106
@chapters1

This comment has been minimized.

Show comment Hide comment
@chapters1

chapters1 Apr 18, 2018

I adore your wp web template, wherever do you obtain it through? Shopperster
I adore your wp web template, wherever do you obtain it through? Shopperster
@chapters1

This comment has been minimized.

Show comment Hide comment
@chapters1

chapters1 Apr 24, 2018

I think this blog is great! Keep up the good work. taroko gorge taiwan
I think this blog is great! Keep up the good work. taroko gorge taiwan
@chapters1

This comment has been minimized.

Show comment Hide comment
@chapters1

chapters1 May 2, 2018

I’m impressed, I must say. Actually rarely should i encounter a weblog that’s both educative and entertaining, and without a doubt, you may have hit the nail to the head. Your concept is outstanding; the catch is something that not enough people are speaking intelligently about. I am happy i always came across this around my seek out something relating to this. link fun 88
I’m impressed, I must say. Actually rarely should i encounter a weblog that’s both educative and entertaining, and without a doubt, you may have hit the nail to the head. Your concept is outstanding; the catch is something that not enough people are speaking intelligently about. I am happy i always came across this around my seek out something relating to this. link fun 88
@chapters1

This comment has been minimized.

Show comment Hide comment
@chapters1

chapters1 May 3, 2018

An impressive share, I just given this onto a colleague who was doing a bit of analysis on this. And he in truth purchased me breakfast as a result of I discovered it for him.. smile. So let me reword that: Thnx for the treat! However yeah Thnkx for spending the time to discuss this, I really feel strongly about it and love studying extra on this topic. If possible, as you develop into expertise, would you thoughts updating your blog with more details? It is highly helpful for me. Huge thumb up for this blog post! link fun 88
An impressive share, I just given this onto a colleague who was doing a bit of analysis on this. And he in truth purchased me breakfast as a result of I discovered it for him.. smile. So let me reword that: Thnx for the treat! However yeah Thnkx for spending the time to discuss this, I really feel strongly about it and love studying extra on this topic. If possible, as you develop into expertise, would you thoughts updating your blog with more details? It is highly helpful for me. Huge thumb up for this blog post! link fun 88
@chapters1

This comment has been minimized.

Show comment Hide comment
@chapters1

chapters1 May 3, 2018

I discovered your blog post website online and check a number of your early posts. Always maintain up the great operate. I recently extra your Feed to my MSN News Reader. Seeking forward to reading a lot more from you finding out afterwards!… garage door Kirkland
I discovered your blog post website online and check a number of your early posts. Always maintain up the great operate. I recently extra your Feed to my MSN News Reader. Seeking forward to reading a lot more from you finding out afterwards!… garage door Kirkland
@chapters1

This comment has been minimized.

Show comment Hide comment
@chapters1

chapters1 May 5, 2018

I visited a lot of website but I conceive this one contains something special in it. Fair Look
I visited a lot of website but I conceive this one contains something special in it. Fair Look
@Edwardfoxx123

This comment has been minimized.

Show comment Hide comment
@Edwardfoxx123

Edwardfoxx123 May 19, 2018

A debt of gratitude is in order for the web journal stacked with such a large number of data. Halting by your web journal assisted me with getting what I was searching for. Kitchen
A debt of gratitude is in order for the web journal stacked with such a large number of data. Halting by your web journal assisted me with getting what I was searching for. Kitchen
@Edwardfoxx123

This comment has been minimized.

Show comment Hide comment
@Edwardfoxx123

Edwardfoxx123 May 21, 2018

Much thanks for this valuable article. I like it. Events
Much thanks for this valuable article. I like it. Events
@michealseo

This comment has been minimized.

Show comment Hide comment
@michealseo

michealseo May 24, 2018

This was a truly extraordinary challenge and ideally I can go to the following one. It was alot of fun and I truly had a ball.. Costume Zombie Lenses
This was a truly extraordinary challenge and ideally I can go to the following one. It was alot of fun and I truly had a ball.. Costume Zombie Lenses
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment