Michael Traxler <M.Traxler(a)gsi.de> writes:
Hello,
when I try to build an image I get the following error message:
% podman build -f tumbleweed_michael.txt -t opensuse/tumbleweed_michael
STEP 1/2: FROM opensuse/tumbleweed
STEP 2/2: RUN zypper ref
error running container: error from /usr/bin/runc creating container
for [/bin/sh -c zypper ref]: time="2022-03-24T12:56:21+01:00"
level=warning msg="unable to get oom kill count" error="openat2
/sys/fs/cgroup/system.slice/runc-buildah-buildah282650677.scope/memory.events:
no such file or directory"
time="2022-03-24T12:56:21+01:00" level=error msg="runc create failed:
unable to start container process: unable to apply cgroup
configuration: unable to start unit
\"runc-buildah-buildah282650677.scope\" (properties [{Name:Description
Value:\"libcontainer container buildah-buildah282650677\"} {Name:Slice
Value:\"system.slice\"} {Name:Delegate Value:true} {Name:PIDs
Value:@au [17389]} {Name:MemoryAccounting Value:true}
{Name:CPUAccounting Value:true} {Name:IOAccounting Value:true}
{Name:TasksAccounting Value:true} {Name:DefaultDependencies
Value:false}]): Interactive authentication required."
: exit status 1
Error: error building at STEP "RUN zypper ref": error while running runtime:
exit status 1
My build file is:
FROM opensuse/tumbleweed
RUN zypper ref
If I then unset DBUS_SESSION_BUS_ADDRESS
everything works as expected.
% echo $DBUS_SESSION_BUS_ADDRESS
unix:abstract=/tmp/dbus-GR9LL799YH,guid=37ca9dd6f1faeea14747aad2623af1ba
% unset DBUS_SESSION_BUS_ADDRESS
% podman build -f tumbleweed_michael.txt -t opensuse/tumbleweed_michael
STEP 1/2: FROM opensuse/tumbleweed
STEP 2/2: RUN zypper ref
...
COMMIT opensuse/tumbleweed_michael
--> 5ea2b965db6
Successfully tagged localhost/opensuse/tumbleweed_michael:latest
5ea2b965db6412368929e52d8c34e4574cc84feef2f2e7563c1f9225a60bb8b8
Is it obvious that DBUS_SESSION_BUS_ADDRESS has to be unset?
do you get the same error if you try with crun?
podman --runtime crun build -f tumbleweed_michael.txt -t opensuse/tumbleweed_michael