Hi Robert, This is a bug in the release build - could you open a PR on https://bugs.freebsd.org/bugzilla/ to track it. In the meantime, for base images containing /bin/sh (e.g. ghcr.io/freebsd/freebsd-runtime:<ver>), you can generate an os-release file by running '/etc/rc.d/os-release start' - this can be added to Containerfiles/Dockerfiles where /etc/os-release is needed.
Doug. On Tue, 3 Feb 2026 at 07:08, Robert Gogolok <[email protected]> wrote: > Hi, > > during my ongoing work on FreeBSD support for buildpacks.io, I ran into a > small question around /etc/os-release in the official FreeBSD container > images. > > In the current images, /etc/os-release is a symlink to > /var/run/os-release, but the target file is not present in the image > layers. Some container tooling (including parts of the buildpacks ecosystem > https://github.com/buildpacks/samples/blob/fa282af819c4b21f4c4d50d27486e21f70f55a68/base-images/build.sh#L68 > ) expects an os-release file to be available in the filesystem and does not > account for it being generated dynamically at runtime. > > I'm still fairly new to how os-release is intended to be handled in > FreeBSD (/etc/rc.d/os-release), so this is meant as an exploratory question > rather than a complaint. Looking at the specification > https://www.freedesktop.org/software/systemd/man/latest/os-release.html > it seems that most Linux distributions generate the file at > build/packaging time. > > From a design perspective, I'm unsure whether the current behavior in > FreeBSD container images is intentional or simply a side effect of how the > images are assembled. > > As a concrete idea: would it be reasonable to generate a static os-release > file as part of the OCI image build process (for example in > release/scripts/make-oci-image.sh), even if a dynamically generated version > still exists on full systems? > > I'd appreciate any background on the current design, and whether such an > approach would align with FreeBSD's goals for container images. > > Best regards, > Robert > >
