I'm having troubles running a buildah build ... from Gitlab-CI on a self-hosted runner with docker as executor and sysbox-runc as docker runtime. Following error is printed in the jobs output:
[...]
STEP 2/3: RUN apk add --no-cache python
time="2024-08-06T15:43:41Z" level=warning msg="pkg/bind: error detaching \"/var/tmp/buildah1882152697/mnt/rootfs\": no such file or directory"
time="2024-08-06T15:43:41Z" level=warning msg="pkg/bind: error removing \"/var/tmp/buildah1882152697/mnt/rootfs\": device or resource busy"
time="2024-08-06T15:43:41Z" level=warning msg="pkg/bind: error removing \"/var/tmp/buildah1882152697/mnt\": directory not empty"
error running subprocess: bind mounting /dev from host into mount namespace: mkdir /var/tmp/buildah1882152697/mnt/rootfs/dev: file exists
Error: deleting build container "96c3a9aad937e16e174792c1ec4edbae3907f1dd469ec0e02339c7eb1d029891": replacing mount point "/var/lib/containers/storage/overlay/76ca95dda33c9e8c343ddf776b4f99b8c9d2fb17c310c59f5cca0f285d9ee100/merged": device or resource busy: building at STEP "RUN apk add --no-cache python": exit status 1
When not using sysbox but the default docker runtime, the docker image build works just fine.
I'm able to reproduce it on Debian server as well as my local Arch installation.
Running the gitlab-runner in privileged mode instead doesn't change anything.
Steps to reproduce the issue:
On a machine which shall be a gitlab runner, install docker, sysbox-ce and gitlab-runner
Register the gitlab-runner with your project in Gitlab
Description
I'm having troubles running a
buildah build ...
from Gitlab-CI on a self-hosted runner with docker as executor and sysbox-runc as docker runtime. Following error is printed in the jobs output:When not using sysbox but the default docker runtime, the docker image build works just fine. I'm able to reproduce it on Debian server as well as my local Arch installation. Running the gitlab-runner in privileged mode instead doesn't change anything.
Steps to reproduce the issue:
Configure the gitlab-runner to use docker as executor with sysbox-runc as runtime
Example Gitlab CI config .gitlab-ci.yml
Example Dockerfile
Describe the results you received:
The build fails with the error message show in the description.
Describe the results you expected:
buildah builds the image just fine without error.
Output of
buildah version
(from within a gitlab job):Output of
buildah info
(from within a gitlab job):*Output of `cat /etc/release`:**
Output of
uname -a
: