Podman build in gitlab runner docker container cannot access overlay #29024
|
I will preface this post by saying that there are multiple factors (podman, docker, gitlab, and Linux hardening) that could be at play here, so if I should be asking this elsewhere, or you know of any information I could provide to shine a light onto the issue, please do let me know. I am porting a project from one GitLab instance to another and I am running into some issues. The image is built as follows: FROM docker.io/hashicorp/terraform:1.15.5 AS terraform
FROM docker.io/alpine/ansible:2.20.0
COPY --from=terraform /bin/terraform /usr/bin/terraform
RUN apk add --no-cache jq envsubst moreutils ansible-lintThe build command is simply We have a custom image that we build on our self-hosted GitLab instance. Our runners use podman to run jobs within containers, while the runners themselves are installed on the (virtual) machine itself. On the GitLab instance where it was originally developed, this works fine, but porting it to the other instance proves problematic... The other instance uses docker for their container runners, and runs the GitLab runner itself also as a docker container. On this GitLab instance, building the image results in the following error: Looking around on forums and documentation, I found that, in order to build/run rootless containers, you need an overlay implementation active on the host, with various options listed. The strange thing is that the host on which this runs does have an overlay implementation active (on XFS iirc), yet the builder cannot seem to access it properly. I have tried to run it with I was not able to find a lot of documentation or discussion on this, so I decided to come here. Does anyone here have an idea as to why podman cannot access the necessary overlay module? Any input, tip, or suggestion is welcome, and I will do my best to provide information that is requested. |
Replies: 1 comment 1 reply
|
fuse-overlayfs is what we still configure in the image's copy of |
fuse-overlayfs is what we still configure in the image's copy of
/etc/containers/storage.conf, and FUSE-based filesystems depend on having a usable /dev/fuse node in the container. If your kernel is recent enough, though, it should be possible to use regular overlay, without fuse-overlayfs. If you know you have the real thing available, commenting out themount_programline in the file before running buildah itself in the container, and possibly editing themountoptsetting, should switch what the copy of buildah in the container attempts to use.