-
Notifications
You must be signed in to change notification settings - Fork 2k
Add alpine-extra images for runtime and aspnet repos #6901
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
base: nightly
Are you sure you want to change the base?
Conversation
Co-authored-by: lbussell <36081148+lbussell@users.noreply.github.com>
|
@copilot we need to add aspnet composite-extra images for Alpine as well. Follow the same patterns as other composite-extra images. |
Co-authored-by: lbussell <36081148+lbussell@users.noreply.github.com>
Added aspnet composite-extra images for Alpine following the same patterns as other composite-extra images. This includes alpine3.22-composite-extra and alpine3.23-composite-extra images for .NET 8.0, 9.0, 10.0, and alpine3.23-composite-extra for .NET 11.0 across all architectures (amd64, arm32v7, arm64v8). Commit: 6964dce Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Summary
Added official alpine-extra images for runtime, aspnet, and aspnet composite repos with globalization support (ICU and tzdata), covering:
Original prompt
This section details on the original issue you should resolve
<issue_title>Provide an official ASP.NET alpine-extra image with globalization support (ICU and tzdata)</issue_title>
<issue_description>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-extraimage 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</issue_description>
<agent_instructions>Add alpine-extra images for the following repos/platforms:
Follow the patterns used for other
-extraimages (ubuntu chiseled and azurelinux-distroless). Since there are already alpine extra images for the runtime-deps repo, this should require minimal (if any) modifications to the Dockerfile templates. The new runtime images should be based on the alpine-extra runtime-deps images, and the new aspnet images should be based on the new alpine-extra runtime images.</agent_instructions>Comments on the Issue (you are @copilot in this section)
@mthalman @DanielLaberge - based on the referenced issue at https://github.com/dotnet/sdk-container-builds/issues/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? @richlander You could use self-contained deployment with the `runtime-deps:8.0-alpine-extra` image with SDK OCI publishing. Can you share why that isn't satisfactory?I'm glad that folks read our announcements!</comment_new>
<comment_new>@lbussell
Could you try adding the argument
--self-contained trueto your publish command, or adding<SelfContained>true</SelfContained>property to your csproj?Also adding @baronfel.</comment_new>
<comment_new>@richlander
Switch to:
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
--arch x64. Also-c Releasecan be skipped. That's now the default fordotnet publish.After we get this resolved, you can try trimming to try to make the image smaller, with
-p:PublishTrimmed=true.We have not rejected the overall request. It makes sense to see if this works.</comment_new>
<comment_new>@richlander
Can you file a bug on dotnet/sdk with your findings on
supported RuntimeIdentifiers. You are correct with your interpretation. Onlylinux-muslvariants should be offered there.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
-aand--osarguments. Still, you need to know howlinuxandlinux-muslare different. This isn't needed in a Dockerfile if you use the Alpine SDK sincedotnet publishdefaults tolinux-muslin that context. With SDK publish run on your dev machine (likely not Alpine), then you need to address this inherent targeting complexity.I hope that explanation helps.</comment_new>
<comment_new>@lbussell
[Triage] @DanielLaberge, it seems like your problem is resolved, right?
We will leave this issue open in o...
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.