DEV Community

AndreasHeissenberger
AndreasHeissenberger

Posted on • Originally published at heissenberger.at

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.

docker run hello-world
Enter fullscreen mode Exit fullscreen mode
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
b8dfde127a29: Pull complete 
Digest: sha256:5122f6204b6a3596e048758cabba3c46b1c937a46b5be6225b835d091b90e46c
Status: Downloaded newer image for hello-world:latest
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.
Enter fullscreen mode Exit fullscreen mode

Solution

open /etc/systemd/system/docker.service in your editor and remove MountFlags=slave from the file:

[Service]
ExecStart=/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-$
MountFlags=slave
LimitNOFILE=1048576
LimitNPROC=1048576
LimitCORE=infinity
Environment=

...
Enter fullscreen mode Exit fullscreen mode

reload the systemd configuration
systemctl daemon-reload

restart docker
systemctl restart docker

Test again with docker run hello-world which should give you:

Hello from Docker!
This message shows that your installation appears to be working correctly.
...
Enter fullscreen mode Exit fullscreen mode

Explaination

The MountFlags=slave is no longer needed Docker Release Notes 18.09.1

Top comments (0)