Docker fails with OCI runtime create failed
The Problem
docker: Error response from daemon: OCI runtime create failed: container_linux.go:367: starting container process caused: exec: "/hello": stat /hello: no such file or directory: unknown.
if you try the simples possible image and get this error you have found the information to solve your problem.
1docker run hello-world
1Unable to find image 'hello-world:latest' locally2latest: Pulling from library/hello-world3b8dfde127a29: Pull complete4Digest: sha256:5122f6204b6a3596e048758cabba3c46b1c937a46b5be6225b835d091b90e46c5Status: Downloaded newer image for hello-world:latest6docker: Error response from daemon: OCI runtime create failed: container_linux.go:367: starting container process caused: exec: "/hello": stat /hello: no such file or directory: unknown.
Solution
open
/etc/systemd/system/docker.service
in your editor and remove
MountFlags=slave
from the file:
1[Service]2ExecStart=/usr/bin/docker daemon -H tcp://0.0.0.0:2376 -H unix:///var/run/docker.sock --storage-driver aufs --tlsverify --tlscacert /etc/docker/ca.pem --tlscert /etc/docker/server.pem --tlskey /etc/docker/server-$3MountFlags=slave4LimitNOFILE=10485765LimitNPROC=10485766LimitCORE=infinity7Environment=89...
reload
the systemd configuration
systemctl daemon-reload
restart
docker
systemctl restart docker
Test again with
docker run hello-world
which should give you:
1Hello from Docker!2This message shows that your installation appears to be working correctly.3...
Explaination
The
MountFlags=slave
is no longer needed
Docker Release Notes 18.09.1