I am new to docker , I tried to create a custom image where i could simply run pacman -Syu --noconfirm
but the following error occurred:
error: failed to initialize alpm library
(could not find or read directory: /var/lib/pacman/)
The command '/bin/sh -c pacman -Syu --noconfirm' returned a non-zero code: 255
My dockerfile is :
#This is a sample Image
FROM archlinux
RUN pacman -Syu --noconfirm
CMD [“echo”,”Image created”]
This workaround has worked for me. It requires patching glibc to an older version.
RUN patched_glibc=glibc-linux4-2.33-4-x86_64.pkg.tar.zst && \
curl -LO "https://repo.archlinuxcn.org/x86_64/$patched_glibc" && \
bsdtar -C / -xvf "$patched_glibc"
https://github.com/qutebrowser/qutebrowser/commit/478e4de7bd1f26bebdcdc166d5369b2b5142c3e2
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With