-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Update base image OS versions #9240
Comments
+1, I find this feature very useful in Node.js. I leverage it to ensure that For example, with |
+1 |
Lot of vulnerabilities on the bullseyes image : |
I just copied and pasted the bun bullseye Dockerfile into bookworm and it worked. So not sure why the hesitation. https://github.com/oven-sh/bun/blob/main/dockerhub/debian-slim/Dockerfile |
Bullseye is necessary to support glibc 2.27, which is used by Amazon Linux 2 and Vercel (for Node v18). |
Can you elaborate on how those platforms prevent the Docker image from being updated to Bookworm? I'm having trouble understanding, given Vercel doesn't support Docker, and the host doesn't care about the container's glibc anyway. Doubly confused since Bullseye ships with glibc 2.31. |
Ok but lot of users use Node v20+. So they could create both images bookworm and bullseye |
oh, i misunderstood this issue is about Bun's published Docker images, not about the Docker images we compile Bun itself with. Yeah we should just update the published Docker images. The ones we compile Bun with do need the oldstable version of Debian to support Node 18 & Amazon Linux 2. We get away with the lower minimum glibc requirement because we force the linker to use older versions of various symbols, and that workaround gets harder the more distant the actual glibc version used for linking is. The problem there is we need to use C++ 20 (WebKit minimum), but libc++ used in older glibc versions has an ABI-breaking change where std::span has pointer and length flipped. We're stuck on Clang 16 until we find a suitable workaround or manually compile glibc with the later version of libc++ and LLVM. |
Is there any update on this? It's literally just a replacement of 2 words in the Dockerfile. |
Would it also be possible to add an image base on something like
|
What is the problem this feature would solve?
I would like to have a Bun container with more recent operating systems (Debian Bookworm, Alpine 3.19). They offer more recent packages (notably OpenSSL 3 in Bookworm instead of 1.1 in Bullseye), have less security vulnerabilities (Bullseye shows 26, Bookworm 18 low vulnerabilities in Docker Scout) and are generally expected to include other improvements.
What is the feature you are proposing to solve the problem?
Replacing the base images
in both build and final steps for consistency. For the distroless build step, an additional bind mount to
/etc/alternatives
is required to provide thewhich
command.What alternatives have you considered?
Like Node.js, Bun could also start publishing images for different OS versions, e.g.
:alpine3.19
,:alpine3.18
,:bookworm
,:bullseye
,:bookworm-slim
,:bullseye-slim
etc.The text was updated successfully, but these errors were encountered: