I redeployed rootless and the conclusions are as follows:
There is no “mount: Permission denied” error.
The 4.20.3 kernel version does not support the “overlay2” storage driver.
The 5.17.3 kernel version supports the “overlay2” storage driver.
Both 4.20.3 and 5.17.3 kernel versions have directory creation errors showing permission issues.
In the 5.17.3 kernel version, when executing “docker top container”, an error about “cgroups” is prompted. This error is not difficult to understand. The official website clearly supports “Cgroup is supported only when running with cgroup v2 and systemd. See Limiting resources .”,I did not use the systemd runing docker .
System version: CentOS 7.6
Kernel version: 4.20.3 and 5.17.3 (trials separately)
Run: select “Without systemd”
# Install rely
yum -y install shadow-utils
#Prohibit selinux
setenforce 0
sed -ri '/^[^#]*SELINUX=/s#=.+$#=disabled#' /etc/selinux/config
#Set kernel parameters
echo "user.max_user_namespaces=65536" >> /etc/sysctl.conf
sudo sysctl --system
#Create user and set password
useradd kry
passwd kry
#Set subuid and subgid
echo "kry:100000:65536" >> /etc/subuid
echo "kry:100000:65536" >> /etc/subgid
#Set repo
yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
#Install
yum -y install docker-ce-rootless-extras
#Install rootless
Additional host login: ssh kry@ip
/usr/bin/dockerd-rootless-setuptool.sh install
Exec dockerd execute part complete information
+ exec dockerd
INFO[2022-04-18T13:53:12.571191231+08:00] Starting up
WARN[2022-04-18T13:53:12.571782405+08:00] Running in rootless mode. This mode has feature limitations.
INFO[2022-04-18T13:53:12.571788155+08:00] Running with RootlessKit integration
INFO[2022-04-18T13:53:12.573223142+08:00] libcontainerd: started new containerd process pid=21655
INFO[2022-04-18T13:53:12.573266682+08:00] parsed scheme: "unix" module=grpc
INFO[2022-04-18T13:53:12.573274787+08:00] scheme "unix" not registered, fallback to default scheme module=grpc
INFO[2022-04-18T13:53:12.573314942+08:00] ccResolverWrapper: sending update to cc: {[{unix:///run/user/1000/docker/containerd/containerd.sock <nil> 0 <nil>}] <nil> <nil>} module=grpc
INFO[2022-04-18T13:53:12.573328533+08:00] ClientConn switching balancer to "pick_first" module=grpc
WARN[0000] deprecated version : `1`, please switch to version `2`
INFO[2022-04-18T13:53:12.585266090+08:00] starting containerd revision=3df54a852345ae127d1fa3092b95168e4a88e2f8 version=1.5.11
INFO[2022-04-18T13:53:12.601769431+08:00] loading plugin "io.containerd.content.v1.content"... type=io.containerd.content.v1
INFO[2022-04-18T13:53:12.601865665+08:00] loading plugin "io.containerd.snapshotter.v1.aufs"... type=io.containerd.snapshotter.v1
INFO[2022-04-18T13:53:12.603895339+08:00] skip loading plugin "io.containerd.snapshotter.v1.aufs"... error="aufs is not supported (modprobe aufs failed: exit status 1 \"modprobe: FATAL: Module aufs not found.\\n\"): skip plugin" type=io.containerd.snapshotter.v1
INFO[2022-04-18T13:53:12.603916666+08:00] loading plugin "io.containerd.snapshotter.v1.devmapper"... type=io.containerd.snapshotter.v1
WARN[2022-04-18T13:53:12.603932175+08:00] failed to load plugin io.containerd.snapshotter.v1.devmapper error="devmapper not configured"
INFO[2022-04-18T13:53:12.603941577+08:00] loading plugin "io.containerd.snapshotter.v1.native"... type=io.containerd.snapshotter.v1
INFO[2022-04-18T13:53:12.604011517+08:00] loading plugin "io.containerd.snapshotter.v1.overlayfs"... type=io.containerd.snapshotter.v1
INFO[2022-04-18T13:53:12.644610084+08:00] loading plugin "io.containerd.snapshotter.v1.zfs"... type=io.containerd.snapshotter.v1
INFO[2022-04-18T13:53:12.644807869+08:00] skip loading plugin "io.containerd.snapshotter.v1.zfs"... error="path /home/kry/.local/share/docker/containerd/daemon/io.containerd.snapshotter.v1.zfs must be a zfs filesystem to be used with the zfs snapshotter: skip plugin" type=io.containerd.snapshotter.v1
INFO[2022-04-18T13:53:12.644825651+08:00] loading plugin "io.containerd.metadata.v1.bolt"... type=io.containerd.metadata.v1
WARN[2022-04-18T13:53:12.644881499+08:00] could not use snapshotter devmapper in metadata plugin error="devmapper not configured"
INFO[2022-04-18T13:53:12.644891033+08:00] metadata content store policy set policy=shared
INFO[2022-04-18T13:53:12.648438514+08:00] loading plugin "io.containerd.differ.v1.walking"... type=io.containerd.differ.v1
INFO[2022-04-18T13:53:12.648462779+08:00] loading plugin "io.containerd.gc.v1.scheduler"... type=io.containerd.gc.v1
INFO[2022-04-18T13:53:12.648491029+08:00] loading plugin "io.containerd.service.v1.introspection-service"... type=io.containerd.service.v1
INFO[2022-04-18T13:53:12.648513409+08:00] loading plugin "io.containerd.service.v1.containers-service"... type=io.containerd.service.v1
INFO[2022-04-18T13:53:12.648522598+08:00] loading plugin "io.containerd.service.v1.content-service"... type=io.containerd.service.v1
INFO[2022-04-18T13:53:12.648531248+08:00] loading plugin "io.containerd.service.v1.diff-service"... type=io.containerd.service.v1
INFO[2022-04-18T13:53:12.648539284+08:00] loading plugin "io.containerd.service.v1.images-service"... type=io.containerd.service.v1
INFO[2022-04-18T13:53:12.648547304+08:00] loading plugin "io.containerd.service.v1.leases-service"... type=io.containerd.service.v1
INFO[2022-04-18T13:53:12.648555539+08:00] loading plugin "io.containerd.service.v1.namespaces-service"... type=io.containerd.service.v1
INFO[2022-04-18T13:53:12.648562909+08:00] loading plugin "io.containerd.service.v1.snapshots-service"... type=io.containerd.service.v1
INFO[2022-04-18T13:53:12.648571141+08:00] loading plugin "io.containerd.runtime.v1.linux"... type=io.containerd.runtime.v1
INFO[2022-04-18T13:53:12.648665227+08:00] loading plugin "io.containerd.runtime.v2.task"... type=io.containerd.runtime.v2
INFO[2022-04-18T13:53:12.648744526+08:00] loading plugin "io.containerd.monitor.v1.cgroups"... type=io.containerd.monitor.v1
INFO[2022-04-18T13:53:12.649003633+08:00] loading plugin "io.containerd.service.v1.tasks-service"... type=io.containerd.service.v1
INFO[2022-04-18T13:53:12.649027538+08:00] loading plugin "io.containerd.internal.v1.restart"... type=io.containerd.internal.v1
INFO[2022-04-18T13:53:12.649061946+08:00] loading plugin "io.containerd.grpc.v1.containers"... type=io.containerd.grpc.v1
INFO[2022-04-18T13:53:12.649072719+08:00] loading plugin "io.containerd.grpc.v1.content"... type=io.containerd.grpc.v1
INFO[2022-04-18T13:53:12.649080806+08:00] loading plugin "io.containerd.grpc.v1.diff"... type=io.containerd.grpc.v1
INFO[2022-04-18T13:53:12.649089865+08:00] loading plugin "io.containerd.grpc.v1.events"... type=io.containerd.grpc.v1
INFO[2022-04-18T13:53:12.649098713+08:00] loading plugin "io.containerd.grpc.v1.healthcheck"... type=io.containerd.grpc.v1
INFO[2022-04-18T13:53:12.649106761+08:00] loading plugin "io.containerd.grpc.v1.images"... type=io.containerd.grpc.v1
INFO[2022-04-18T13:53:12.649116186+08:00] loading plugin "io.containerd.grpc.v1.leases"... type=io.containerd.grpc.v1
INFO[2022-04-18T13:53:12.649124095+08:00] loading plugin "io.containerd.grpc.v1.namespaces"... type=io.containerd.grpc.v1
INFO[2022-04-18T13:53:12.649132634+08:00] loading plugin "io.containerd.internal.v1.opt"... type=io.containerd.internal.v1
WARN[2022-04-18T13:53:12.649162746+08:00] failed to load plugin io.containerd.internal.v1.opt error="mkdir /opt/containerd: permission denied"
INFO[2022-04-18T13:53:12.649174003+08:00] loading plugin "io.containerd.grpc.v1.snapshots"... type=io.containerd.grpc.v1
INFO[2022-04-18T13:53:12.649185398+08:00] loading plugin "io.containerd.grpc.v1.tasks"... type=io.containerd.grpc.v1
INFO[2022-04-18T13:53:12.649194269+08:00] loading plugin "io.containerd.grpc.v1.version"... type=io.containerd.grpc.v1
INFO[2022-04-18T13:53:12.649204219+08:00] loading plugin "io.containerd.grpc.v1.introspection"... type=io.containerd.grpc.v1
INFO[2022-04-18T13:53:12.649330015+08:00] serving... address=/run/user/1000/docker/containerd/containerd-debug.sock
INFO[2022-04-18T13:53:12.649375944+08:00] serving... address=/run/user/1000/docker/containerd/containerd.sock.ttrpc
INFO[2022-04-18T13:53:12.649421722+08:00] serving... address=/run/user/1000/docker/containerd/containerd.sock
INFO[2022-04-18T13:53:12.649438936+08:00] containerd successfully booted in 0.065380s
INFO[2022-04-18T13:53:12.656812289+08:00] parsed scheme: "unix" module=grpc
INFO[2022-04-18T13:53:12.656834415+08:00] scheme "unix" not registered, fallback to default scheme module=grpc
INFO[2022-04-18T13:53:12.656852535+08:00] ccResolverWrapper: sending update to cc: {[{unix:///run/user/1000/docker/containerd/containerd.sock <nil> 0 <nil>}] <nil> <nil>} module=grpc
INFO[2022-04-18T13:53:12.656861047+08:00] ClientConn switching balancer to "pick_first" module=grpc
INFO[2022-04-18T13:53:12.657479694+08:00] parsed scheme: "unix" module=grpc
INFO[2022-04-18T13:53:12.657491941+08:00] scheme "unix" not registered, fallback to default scheme module=grpc
INFO[2022-04-18T13:53:12.657501847+08:00] ccResolverWrapper: sending update to cc: {[{unix:///run/user/1000/docker/containerd/containerd.sock <nil> 0 <nil>}] <nil> <nil>} module=grpc
INFO[2022-04-18T13:53:12.657507682+08:00] ClientConn switching balancer to "pick_first" module=grpc
ERRO[2022-04-18T13:53:12.657977442+08:00] overlay is not supported for Rootless with SELinux storage-driver=overlay2
INFO[2022-04-18T13:53:12.682964914+08:00] Loading containers: start.
INFO[2022-04-18T13:53:12.746520128+08:00] Default bridge (docker0) is assigned with an IP address 172.17.0.0/16. Daemon option --bip can be used to set a preferred IP address
INFO[2022-04-18T13:53:12.825972213+08:00] Loading containers: done.
INFO[2022-04-18T13:53:12.833729808+08:00] Docker daemon commit=87a90dc graphdriver(s)=fuse-overlayfs version=20.10.14
INFO[2022-04-18T13:53:12.833889917+08:00] Daemon has completed initialization
INFO[2022-04-18T13:53:12.857584255+08:00] API listen on /run/user/1000/docker.sock
Notable information
WARN[2022-04-18T13:53:12.649162746+08:00] failed to load plugin io.containerd.internal.v1.opt error="mkdir /opt/containerd: permission denied"
ERRO[2022-04-18T13:53:12.657977442+08:00] overlay is not supported for Rootless with SELinux storage-driver=overlay2
INFO[2022-04-18T13:53:12.833729808+08:00] Docker daemon commit=87a90dc graphdriver(s)=fuse-overlayfs version=20.10.14
You can pull the container and run the container normally.
This deployment did not reproduce the “mount: permission denied” error,Happy!
mount: permission denied
[rootlesskit:child ] error: command [/usr/bin/dockerd-rootless.sh] exited: exit status 32
[rootlesskit:parent] error: child exited: exit status 32
Now start trying to manually upgrade the kernel version to 5.17.3
upgrade process
rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
yum install https://www.elrepo.org/elrepo-release-7.0-4.el7.elrepo.noarch.rpm
yum --enablerepo=elrepo-kernel -y install kernel-ml
“GRUB_DEFAULT=0” Add to the third line of the /etc/default/grub file
grub2-mkconfig -o /boot/grub2/grub.cfg
reboot
In the kry user, execute “dockerd-rootless.sh”, the error message is as follows.
WARN[2022-04-18T14:07:34.027628641+08:00] failed to load plugin io.containerd.internal.v1.opt error="mkdir /opt/containerd: permission denied
WARN[2022-04-18T14:07:34.118359030+08:00] Running modprobe bridge br_netfilter failed with message: modprobe: ERROR: could not insert 'br_netfilter': Operation not permitted
insmod /lib/modules/5.17.3-1.el7.elrepo.x86_64/kernel/net/bridge/br_netfilter.ko
, error: exit status 1
INFO[2022-04-18T14:07:34.410570315+08:00] Docker daemon commit=87a90dc graphdriver(s)=fuse-overlayfs version=20.10.14
permission denied solution
mkdir /opt/containerd
chown kry:kry /opt/containerd
error br_netfilter solution
sudo modprobe br_netfilter
storage drivers solution
cat .config/docker/daemon.json
{
"storage-driver": "overlay2"
}
Re-execute “dockerd-rootless.sh” after solving,
+ exec dockerd
INFO[2022-04-18T14:11:19.660352383+08:00] Starting up
WARN[2022-04-18T14:11:19.660390220+08:00] Running in rootless mode. This mode has feature limitations.
INFO[2022-04-18T14:11:19.660394813+08:00] Running with RootlessKit integration
INFO[2022-04-18T14:11:19.661041611+08:00] libcontainerd: started new containerd process pid=7654
INFO[2022-04-18T14:11:19.661065902+08:00] parsed scheme: "unix" module=grpc
INFO[2022-04-18T14:11:19.661073597+08:00] scheme "unix" not registered, fallback to default scheme module=grpc
INFO[2022-04-18T14:11:19.661085896+08:00] ccResolverWrapper: sending update to cc: {[{unix:///run/user/1000/docker/containerd/containerd.sock <nil> 0 <nil>}] <nil> <nil>} module=grpc
INFO[2022-04-18T14:11:19.661100917+08:00] ClientConn switching balancer to "pick_first" module=grpc
WARN[0000] deprecated version : `1`, please switch to version `2`
INFO[2022-04-18T14:11:19.672132552+08:00] starting containerd revision=3df54a852345ae127d1fa3092b95168e4a88e2f8 version=1.5.11
INFO[2022-04-18T14:11:19.686827699+08:00] loading plugin "io.containerd.content.v1.content"... type=io.containerd.content.v1
INFO[2022-04-18T14:11:19.686854731+08:00] loading plugin "io.containerd.snapshotter.v1.aufs"... type=io.containerd.snapshotter.v1
INFO[2022-04-18T14:11:19.687685294+08:00] skip loading plugin "io.containerd.snapshotter.v1.aufs"... error="aufs is not supported (modprobe aufs failed: exit status 1 \"modprobe: FATAL: Module aufs not found.\\n\"): skip plugin" type=io.containerd.snapshotter.v1
INFO[2022-04-18T14:11:19.687705832+08:00] loading plugin "io.containerd.snapshotter.v1.devmapper"... type=io.containerd.snapshotter.v1
WARN[2022-04-18T14:11:19.687723013+08:00] failed to load plugin io.containerd.snapshotter.v1.devmapper error="devmapper not configured"
INFO[2022-04-18T14:11:19.687731234+08:00] loading plugin "io.containerd.snapshotter.v1.native"... type=io.containerd.snapshotter.v1
INFO[2022-04-18T14:11:19.687765870+08:00] loading plugin "io.containerd.snapshotter.v1.overlayfs"... type=io.containerd.snapshotter.v1
INFO[2022-04-18T14:11:19.689609241+08:00] loading plugin "io.containerd.snapshotter.v1.zfs"... type=io.containerd.snapshotter.v1
INFO[2022-04-18T14:11:19.689762828+08:00] skip loading plugin "io.containerd.snapshotter.v1.zfs"... error="path /home/kry/.local/share/docker/containerd/daemon/io.containerd.snapshotter.v1.zfs must be a zfs filesystem to be used with the zfs snapshotter: skip plugin" type=io.containerd.snapshotter.v1
INFO[2022-04-18T14:11:19.689784722+08:00] loading plugin "io.containerd.metadata.v1.bolt"... type=io.containerd.metadata.v1
WARN[2022-04-18T14:11:19.689797869+08:00] could not use snapshotter devmapper in metadata plugin error="devmapper not configured"
INFO[2022-04-18T14:11:19.689813204+08:00] metadata content store policy set policy=shared
INFO[2022-04-18T14:11:19.689906768+08:00] loading plugin "io.containerd.differ.v1.walking"... type=io.containerd.differ.v1
INFO[2022-04-18T14:11:19.689923935+08:00] loading plugin "io.containerd.gc.v1.scheduler"... type=io.containerd.gc.v1
INFO[2022-04-18T14:11:19.689970659+08:00] loading plugin "io.containerd.service.v1.introspection-service"... type=io.containerd.service.v1
INFO[2022-04-18T14:11:19.689993177+08:00] loading plugin "io.containerd.service.v1.containers-service"... type=io.containerd.service.v1
INFO[2022-04-18T14:11:19.690019064+08:00] loading plugin "io.containerd.service.v1.content-service"... type=io.containerd.service.v1
INFO[2022-04-18T14:11:19.690032992+08:00] loading plugin "io.containerd.service.v1.diff-service"... type=io.containerd.service.v1
INFO[2022-04-18T14:11:19.690050893+08:00] loading plugin "io.containerd.service.v1.images-service"... type=io.containerd.service.v1
INFO[2022-04-18T14:11:19.690066835+08:00] loading plugin "io.containerd.service.v1.leases-service"... type=io.containerd.service.v1
INFO[2022-04-18T14:11:19.690082186+08:00] loading plugin "io.containerd.service.v1.namespaces-service"... type=io.containerd.service.v1
INFO[2022-04-18T14:11:19.690099013+08:00] loading plugin "io.containerd.service.v1.snapshots-service"... type=io.containerd.service.v1
INFO[2022-04-18T14:11:19.690108479+08:00] loading plugin "io.containerd.runtime.v1.linux"... type=io.containerd.runtime.v1
INFO[2022-04-18T14:11:19.690168980+08:00] loading plugin "io.containerd.runtime.v2.task"... type=io.containerd.runtime.v2
INFO[2022-04-18T14:11:19.690215695+08:00] loading plugin "io.containerd.monitor.v1.cgroups"... type=io.containerd.monitor.v1
INFO[2022-04-18T14:11:19.690496993+08:00] loading plugin "io.containerd.service.v1.tasks-service"... type=io.containerd.service.v1
INFO[2022-04-18T14:11:19.690528855+08:00] loading plugin "io.containerd.internal.v1.restart"... type=io.containerd.internal.v1
INFO[2022-04-18T14:11:19.690577617+08:00] loading plugin "io.containerd.grpc.v1.containers"... type=io.containerd.grpc.v1
INFO[2022-04-18T14:11:19.690590646+08:00] loading plugin "io.containerd.grpc.v1.content"... type=io.containerd.grpc.v1
INFO[2022-04-18T14:11:19.690607517+08:00] loading plugin "io.containerd.grpc.v1.diff"... type=io.containerd.grpc.v1
INFO[2022-04-18T14:11:19.690616698+08:00] loading plugin "io.containerd.grpc.v1.events"... type=io.containerd.grpc.v1
INFO[2022-04-18T14:11:19.690626244+08:00] loading plugin "io.containerd.grpc.v1.healthcheck"... type=io.containerd.grpc.v1
INFO[2022-04-18T14:11:19.690636486+08:00] loading plugin "io.containerd.grpc.v1.images"... type=io.containerd.grpc.v1
INFO[2022-04-18T14:11:19.690643616+08:00] loading plugin "io.containerd.grpc.v1.leases"... type=io.containerd.grpc.v1
INFO[2022-04-18T14:11:19.690660056+08:00] loading plugin "io.containerd.grpc.v1.namespaces"... type=io.containerd.grpc.v1
INFO[2022-04-18T14:11:19.690667895+08:00] loading plugin "io.containerd.internal.v1.opt"... type=io.containerd.internal.v1
INFO[2022-04-18T14:11:19.690770503+08:00] loading plugin "io.containerd.grpc.v1.snapshots"... type=io.containerd.grpc.v1
INFO[2022-04-18T14:11:19.690786964+08:00] loading plugin "io.containerd.grpc.v1.tasks"... type=io.containerd.grpc.v1
INFO[2022-04-18T14:11:19.690797276+08:00] loading plugin "io.containerd.grpc.v1.version"... type=io.containerd.grpc.v1
INFO[2022-04-18T14:11:19.690814074+08:00] loading plugin "io.containerd.grpc.v1.introspection"... type=io.containerd.grpc.v1
INFO[2022-04-18T14:11:19.690944433+08:00] serving... address=/run/user/1000/docker/containerd/containerd-debug.sock
INFO[2022-04-18T14:11:19.690997188+08:00] serving... address=/run/user/1000/docker/containerd/containerd.sock.ttrpc
INFO[2022-04-18T14:11:19.691049009+08:00] serving... address=/run/user/1000/docker/containerd/containerd.sock
INFO[2022-04-18T14:11:19.691062123+08:00] containerd successfully booted in 0.019711s
INFO[2022-04-18T14:11:19.697636173+08:00] parsed scheme: "unix" module=grpc
INFO[2022-04-18T14:11:19.697666173+08:00] scheme "unix" not registered, fallback to default scheme module=grpc
INFO[2022-04-18T14:11:19.697688704+08:00] ccResolverWrapper: sending update to cc: {[{unix:///run/user/1000/docker/containerd/containerd.sock <nil> 0 <nil>}] <nil> <nil>} module=grpc
INFO[2022-04-18T14:11:19.697697166+08:00] ClientConn switching balancer to "pick_first" module=grpc
INFO[2022-04-18T14:11:19.698084626+08:00] parsed scheme: "unix" module=grpc
INFO[2022-04-18T14:11:19.698114562+08:00] scheme "unix" not registered, fallback to default scheme module=grpc
INFO[2022-04-18T14:11:19.698125929+08:00] ccResolverWrapper: sending update to cc: {[{unix:///run/user/1000/docker/containerd/containerd.sock <nil> 0 <nil>}] <nil> <nil>} module=grpc
INFO[2022-04-18T14:11:19.698130757+08:00] ClientConn switching balancer to "pick_first" module=grpc
WARN[2022-04-18T14:11:19.700972853+08:00] Your kernel does not support cgroup blkio weight
WARN[2022-04-18T14:11:19.700987496+08:00] Your kernel does not support cgroup blkio weight_device
INFO[2022-04-18T14:11:19.701099475+08:00] Loading containers: start.
INFO[2022-04-18T14:11:19.764264361+08:00] Default bridge (docker0) is assigned with an IP address 172.17.0.0/16. Daemon option --bip can be used to set a preferred IP address
INFO[2022-04-18T14:11:19.786181372+08:00] Loading containers: done.
WARN[2022-04-18T14:11:19.791622006+08:00] Not using native diff for overlay2, this may cause degraded performance for building images: running in a user namespace storage-driver=overlay2
INFO[2022-04-18T14:11:19.791781056+08:00] Docker daemon commit=87a90dc graphdriver(s)=overlay2 version=20.10.14
INFO[2022-04-18T14:11:19.791817509+08:00] Daemon has completed initialization
INFO[2022-04-18T14:11:19.800899326+08:00] API listen on /run/user/1000/docker.sock
View storage driver information
[kry@localhost ~]$ docker info |grep "Storage"
Storage Driver: overlay2
WARNING: Running in rootless-mode without cgroups. To enable cgroups in rootless-mode, you need to boot the system in cgroup v2 mode.
Pull image to create container
[kry@localhost ~]$ docker pull nginx
Using default tag: latest
latest: Pulling from library/nginx
c229119241af: Pull complete
2215908dc0a2: Pull complete
08c3cb2073f1: Pull complete
18f38162c0ce: Pull complete
10e2168f148a: Pull complete
c4ffe9532b5f: Pull complete
Digest: sha256:2275af0f20d71b293916f1958f8497f987b8d8fd8113df54635f2a5915002bf1
Status: Downloaded newer image for nginx:latest
docker.io/library/nginx:latest
[kry@localhost ~]$ docker run -d -p8080:80 nginx
eb6f16bd2f81eca4adec71938c5f83be234a2f2e2a8c9f1f85d5c8da7f6c624f
[kry@localhost docker]$ netstat -antulp |grep "8080"
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN 7945/rootlesskit
tcp6 0 0 :::8080 :::* LISTEN 7945/rootlesskit
[kry@localhost ~]$ curl 127.0.0.1:8080 -I
HTTP/1.1 200 OK
Server: nginx/1.21.6
Date: Mon, 18 Apr 2022 07:37:28 GMT
Content-Type: text/html
Content-Length: 615
Last-Modified: Tue, 25 Jan 2022 15:03:52 GMT
Connection: keep-alive
ETag: "61f01158-267"
Accept-Ranges: bytes
There are no problems with pulling, running, and restarting the test container.
Only if the container is stopped, an error will be generated.
Error response from daemon: runc did not terminate successfully: exit status 1: container_linux.go:187: getting all container pids from cgroups caused: lstat : no such file or directory
: unknown
Personally suspect that it is caused by not running docker based on systemd.
Based on “Without systemd” mode, tested with different kernel versions,accumulate rich experience.
Thank you very much for your help and reply!