I am using docker on my CentOS Linux release 7.8.2003 (Core)
with 16 GB RAM. My docker version is Docker version 19.03.7
. Docker-compose version is docker-compose version 1.23.2
. I have 30+ docker containers running on my machine.
Everything was working smoothly, but I ran into a problem. Sometimes, when I try to run a container I get this error
ERROR: for container_name Cannot start service container_name: OCI runtime create failed: container_linux.go:349:
starting container process caused "process_linux.go:319: getting the final child's pid from pipe caused "EOF"": unknown
When I retry 3-5 times to run container, the container started successfully. Sometimes I need to restart docker service and my server to make it working. I don’t know the exact reason why It is giving me this error sometimes and gets created successfully sometimes with same docker-compose file.
Can somebody explain this weird behavior of docker to me? Is it due to so many containers running on my machine or something else?
3
Answers
Came across this link, which solved the issue for me. It apparently works for WSL, but definitely also for my Ubuntu 18.04 installation: the latest version(s) of docker have this problem, a few versions back they haven’t.
I had a similar issue:
and the problem turned out to be the wrong version of my WSL distro, which was 1 instead of 2:
So I used the
wsl --set-version
command to upgrade it:Then I was able to successfully build my Docker image.
Hope can help someone.
I am a complete newb to Docker and am running Linux 18.04.6 Bionic Beaver
docker –version reports Docker version 20.10.7, build 20.10.7-0ubuntu5~18.04.3
I’m not sure if this is the solution, but after reinstalling Docker from various unrelated problems I ran
runc init
and killed an old running dockerd process and was able to get hello-world to run. I’ve wasted so much time on it that I don’t want to find the root cause.