You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pixi, using pixi --version.
Reproducible example
Using this example Dockerfile:
FROM busybox:musl as tools
FROM gcr.io/distroless/base-debian12 AS setup
COPY --from=tools /bin/sh /bin/sh
COPY --from=tools /bin/wget /bin/wget
COPY --from=tools /bin/tar /bin/tar
RUN wget https://github.com/prefix-dev/pixi/releases/download/v0.39.2/pixi-x86_64-unknown-linux-musl.tar.gz -O - | tar -C /bin -xzf -
CMD [ "pixi", "info", "-vvv"]
Launching it like this:
docker run --tty --rm $(docker build --quiet .)
Results in:
INFO rattler_virtual_packages::libc: failed to execute `ldd --version`: No such file or directory (os error 2). Assuming libc is not available.
DEBUG pixi_config: Loading config from /etc/pixi/config.toml
DEBUG pixi_config: Failed to load system config: /etc/pixi/config.toml (error: failed to read config from '/etc/pixi/config.toml')
System
------------
Pixi version: 0.39.2
Platform: linux-64
Virtual packages: __unix=0=0
: __linux=6.8.0=0
: __archspec=1=skylake
Cache dir: /root/.cache/rattler/cache
Auth storage: /root/.rattler/credentials.json
Config locations: No config files found
Global
------------
Bin dir: /root/.pixi/bin
Environment dir: /root/.pixi/envs
Manifest dir: /root/.pixi/manifests/pixi-global.toml
Issue description
Currently when running pixi inside of a distroless image (e.g. gcr.io/distroless/base-debian12 ) it fails to detect the version of glibc. I believe this is because of the lack of the ldd binary.
Expected behavior
I would expect the __glibc virtual package to be populated with the correct version.
It should be possible to fall back to extracting the version from the libc.so file.
Using the provided Dockerfile and launching it like this:
docker run --tty --rm $(docker build --quiet .) /lib/x86_64-linux-gnu/libc.so.6
Results in:
GNU C Library (Debian GLIBC 2.36-9+deb12u9) stable release version 2.36.
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 12.2.0.
libc ABIs: UNIQUE IFUNC ABSOLUTE
Minimum supported kernel: 3.2.0
For bug reporting instructions, please see:
<http://www.debian.org/Bugs/>.
Which contains the expected version.
Alternatively, a potential solution could be to allow setting the virtual package versions in the systemwide /etc/pixi/config.toml file.
The text was updated successfully, but these errors were encountered:
Checks
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pixi, using
pixi --version
.Reproducible example
Using this example Dockerfile:
Launching it like this:
docker run --tty --rm $(docker build --quiet .)
Results in:
Issue description
Currently when running pixi inside of a distroless image (e.g. gcr.io/distroless/base-debian12 ) it fails to detect the version of glibc. I believe this is because of the lack of the ldd binary.
Expected behavior
I would expect the
__glibc
virtual package to be populated with the correct version.It should be possible to fall back to extracting the version from the
libc.so
file.Using the provided Dockerfile and launching it like this:
docker run --tty --rm $(docker build --quiet .) /lib/x86_64-linux-gnu/libc.so.6
Results in:
Which contains the expected version.
Alternatively, a potential solution could be to allow setting the virtual package versions in the systemwide
/etc/pixi/config.toml
file.The text was updated successfully, but these errors were encountered: