genuinetools / img

Standalone, daemon-less, unprivileged Dockerfile and OCI compatible container image builder.
https://blog.jessfraz.com/post/building-container-images-securely-on-kubernetes/
MIT License
3.88k stars 229 forks source link

pacman breaks img build #331

Open lazakoa opened 3 years ago

lazakoa commented 3 years ago
#4 unpacking docker.io/library/archlinux:base-devel@sha256:e68185793c7498bc37b4d5487c62e136f1cf65bd995a5fffe7c45705f2eeff2b
#4 ...
#9 [internal] load build context
#9 transferring context: 713.21MB 7.6s
#9 transferring context: 1.07GB 11.4s done
#9 DONE 11.6s
#4 [1/9] FROM docker.io/library/archlinux:base-devel@sha256:e68185793c7498b...
#4 unpacking docker.io/library/archlinux:base-devel@sha256:e68185793c7498bc37b4d5487c62e136f1cf65bd995a5fffe7c45705f2eeff2b 12.7s done
#4 DONE 17.3s
#5 [2/9] RUN echo "Server = https://cloudflaremirrors.com/archlinux/$repo/o...
#5 DONE 5.2s
#6 [3/9] RUN pacman -Syu yarn maven git wget curl bash postgresql --noconfi...
#6 0.084 error: failed to initialize alpm library
#6 0.084 (could not find or read directory: /var/lib/pacman/)
#6 ERROR: executor failed running [/bin/sh -c pacman -Syu yarn maven git wget curl bash postgresql --noconfirm]: runc did not terminate successfully
------
 > [3/9] RUN pacman -Syu yarn maven git wget curl bash postgresql --noconfirm:
------
Error: failed to solve: executor failed running [/bin/sh -c pacman -Syu yarn maven git wget curl bash postgresql --noconfirm]: runc did not terminate successfully

Works in docker but doesn't work in img, strange. I regularly build images based on debian by running apt-get install and that seems to work with img just fine. I'm running this in a kubernetes cluster as part of a gitlab pipeline, i have the correct annotations enabled.