-
Notifications
You must be signed in to change notification settings - Fork 2k
Provide an official ASP.NET alpine-extra image with globalization support (ICU and tzdata) #4955
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@DanielLaberge - based on the referenced issue at dotnet/sdk-container-builds#512, I'm assuming this is in the context of wanting to use the SDK container publishing feature and that you don't want to have to maintain your own Dockerfile. Is that correct? |
@mthalman That is correct. I will edit the issue to reflect that. |
You could use self-contained deployment with the
I'm glad that folks read our announcements! |
@richlander I will gladly try this and report my results if someone could point me to relevant documentation on how to achieve this with an ASP.NET app. I've tried adding the following to my .csproj: Then building with I assume I must be missing some step, but I couldn't find relevant documentation or examples. |
Could you try adding the argument Also adding @baronfel. |
@lbussell I indeed had the |
I have reproduced the same error with a blank ASP.NET template like so:
However, if I don't specify the ContainerBaseImage, it defaults to |
Switch to: dotnet publish --os linux-musl You are saying "I want an app compatible with Linux glibc" when you want one compatible with musl (what Alpine uses). If you are building on x64, then you can skip After we get this resolved, you can try trimming to try to make the image smaller, with We have not rejected the overall request. It makes sense to see if this works. |
Specifying I wasn't aware of this detail, being unfamiliar with alpine images.
I think this discussion illustrates why an official aspnet alpine-extra image might be helpful to the community; allowing everyone to benefit from the smallest possible image without this kind of friction and specific required knowledge. It would be as simple as setting Thank you for the consideration. |
Can you file a bug on dotnet/sdk with your findings on Part of the reason that Alpine images are smaller is because they use a different libc variant called musl. That makes Alpine incompatible with software compiled for Ubuntu, for example. This is a generic problem. For example Project Portola was established to create a Java port for Alpine. We didn't make such a big deal of doing the work, but it wasn't cheap. This complexity leaks out to users. This is what RIDs are for. We've tried to hide that with this I hope that explanation helps. |
[Triage] @DanielLaberge, it seems like your problem is resolved, right? We will leave this issue open in order to collect feedback on whether there is more demand for |
@lbussell: Yes, thank you. |
Globalization and the icu support are pretty important features.
Having a small image might be important but safe by default and making it simple to do the right thing is even more important. No root user and no shell are awesome features in that regards. |
I would definitely appreciate this change, we are currently using dotnet publish in combination with ContainerFamily to build the containers. at the moment we have to use -p:ContainerFamily=jammy-chiseled-extra |
Can you please clarify few question? I am using dotnet cli 8.0.203
I am able to access the API. I want to try the same with Alpine, so I followed this issue. Command I have used is this
When I try to run the container using above command and access the API it returns 500 error. Also, is there a way to output dockerfile generated by publish command? |
We would greatly benefit from having |
+1 considering that there is already |
Yes, you can see the following tags at https://github.com/dotnet/dotnet-docker/blob/main/README.aspnet.md
@RaviTejaKaruturi -- Did you ever resolve your problem? I only saw your request for help now. I'd be happy to look at that with you again. |
Please reconsider providing an official alpine-extra image for ASP.NET (and runtime) that supports globalization.
This announcement mentions:
Currently, we are either forced to:
This goes against the "Batteries included and Choose your own adventure" themes in the announcement.
We would like to concentrate on developing apps, not maintaining custom containers.
Thank you.
EDIT: For anyone looking to get the smallest image in the meantime, you can use the the
runtime-deps:8.0-alpine-extra
image like this:dotnet publish --os linux-musl --self-contained true -p:ContainerBaseImage=mcr.microsoft.com/dotnet/runtime-deps:8.0-alpine-extra -p:PublishProfile=DefaultContainer
The text was updated successfully, but these errors were encountered: