I had the same error, "OCI runtime create failed: container_linux.go:367: starting container process caused: process_linux.go:340: applying cgroup configuration for process caused: no cgroup mount found in mountinfo: unknown
"
First, check if "docker run hello-world
" is working properly. This will validate the docker installation.
I found this script very useful.
Owner: https://mobyproject.org/
- Download with "curl https://raw.githubusercontent.com/docker/docker/master/contrib/check-config.sh > check-config.sh"
- Make rwx with "chmod 777 check-config.sh" & execute "./check-config.sh"
- Understand the output, mainly the cgroup hierarchy.
- If cgroup hierarchy is "properly mounted [/sys/fs/cgroup]" then we shouldn't be seeing this problem.
- If cgroup hierarchy is something like "?????????" then below are the things which you should seek to fix the problem.
Try & Hit solutions:
- Install cgroup-utils & cgroup-lite
sudo apt-get install cgroup-lite cgroup-utils
- https://github.com/docker/for-linux/issues/219#issuecomment-375160449
Which is to mount systemd with
sudo mount -t cgroup -o none,name=systemd cgroup /sys/fs/cgroup/systemd
- There are few kernel setting solutions on the internet that you could try if you like.
- If nothings works, then it is surely the problem of your docker installation, which was my case too [SOLVED], then you should go for replacing the docker installation. Default installation with docker-ce version 20.10 was also problematic for me but custom installation of docker-ce version 18.09 was helpful.
Remove current installation:
sudo apt-get purge docker-ce docker-ce-cli containerd.io || sudo rm -rf /var/lib/docker || sudo rm -rf /var/lib/containerd
Install new docker-ce, docker-cli & containerd-io as per the Linux distribution:
Go to https://download.docker.com/linux/ubuntu/dists/, choose your Ubuntu version, then browse to pool/stable/, choose amd64, armhf, or arm64, and download the .deb file for the Docker Engine version you want to install & install with sudo dpkg -i /path/to/package.deb
In the end, recheck docker run hello-world
.