oven-sh / bun

Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one
https://bun.sh
Other
72.79k stars 2.64k forks source link

Update base image OS versions #9240

Open marvinruder opened 5 months ago

marvinruder commented 5 months ago

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

alpine:3.18                           -> alpine:3.19
debian:bullseye                       -> debian:bookworm
debian:bullseye-slim                  -> debian:bookworm-slim
gcr.io/distroless/base-nossl-debian11 -> gcr.io/distroless/base-nossl-debian12

in both build and final steps for consistency. For the distroless build step, an additional bind mount to /etc/alternatives is required to provide the which 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.

simonecervini commented 5 months ago

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.

+1, I find this feature very useful in Node.js. I leverage it to ensure that apk add chromium always installs a very specific version of Chromium depending on the very specific version of Alpine, so that Puppeteer and its dependencies always work well together.

For example, with FROM node:20.11.1-alpine3.19, I know that apk add chromium=122.0.6261.128-r0 is possible, and I can easily check the package by visiting https://pkgs.alpinelinux.org/packages?name=chromium&branch=v3.19&repo=&arch=&maintainer=

pmbanugo commented 1 month ago

+1