From 206445fa4f14d1686cfa87007d07198c459ef6c6 Mon Sep 17 00:00:00 2001 From: Akihiro Suda Date: Fri, 5 Jul 2024 02:59:42 +0900 Subject: [PATCH] rootless: add `Requires=dbus.socket` On a cgroup v2 host with systemd, dbus is needed to avoid the following error: ``` docker: Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed : unable to start container process: unable to apply cgroup configuration: unable to start unit "docker-170a4183e351e69835b82cc3134b97c8cbb0e6d3a6 16d5a0fb0ea473075062ad.scope" (properties [{Name:Description Value:"libcontainer container 170a4183e351e69835b82cc3134b97c8cbb0e6d3a616d5a0fb0ea47 3075062ad"} {Name:Slice Value:"user.slice"} {Name:Delegate Value:true} {Name:PIDs Value:@au [2872]} {Name:MemoryAccounting Value:true} {Name:CPUAc counting Value:true} {Name:IOAccounting Value:true} {Name:TasksAccounting Value:true} {Name:DefaultDependencies Value:false}]): Interactive authen tication required.: unknown. ``` Signed-off-by: Akihiro Suda --- contrib/dockerd-rootless-setuptool.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/contrib/dockerd-rootless-setuptool.sh b/contrib/dockerd-rootless-setuptool.sh index 4a9ae75baeae7..bddbf187c0a1e 100755 --- a/contrib/dockerd-rootless-setuptool.sh +++ b/contrib/dockerd-rootless-setuptool.sh @@ -314,6 +314,7 @@ install_systemd() { [Unit] Description=Docker Application Container Engine (Rootless) Documentation=https://docs.docker.com/go/rootless/ + Requires=dbus.socket [Service] Environment=PATH=$BIN:/sbin:/usr/sbin:$PATH