Docker Community Forums

Share and learn in the Docker community.

Docker run command failed caused by err: executable file not found in $PATH": unknown

In the beginning everything is ok, however when I set the “MountFlags=slave” in /usr/lib/systemd/system/docker.service, and reload/restart the docker service, all the docker run commands failed, and I get this error msg:

# docker run -it busybox

docker: Error response from daemon: OCI runtime create failed: container_linux.go:348: starting container process caused "exec: \"sh\": executable file not found in $PATH": unknown.

My docker version:

 Version:           18.09.0
 API version:       1.39
 Go version:        go1.10.4
 Git commit:        4d60db4
 Built:             Wed Nov  7 00:48:22 2018
 OS/Arch:           linux/amd64
 Experimental:      false

Why does this happen? and how to solve it if I need to set the MountFlags ?

Anyone have any idea on this issue, I have the same issue running commands with this exact version.

Check /etc/systemd/system/docker.service.d/ path and if it contain some files, try delete it or move to home directory. After delete it, try systemctl daemon-reload && systemctl restart docker.