Nabil
Nabil

Reputation: 1223

docker-runc not installed on system

I recently updated my Centos 7 based machine. And since, i fail to start any of my dockers. Does someone have some experience with this issue and if yes how did you fix it ? Thanks for your valuable help. Below the error log

docker run -it centos6_labs_ompi161_devtools3 /usr/bin/docker-current: Error response from daemon: shim error: docker-runc not installed on system.

Upvotes: 21

Views: 33078

Answers (6)

Skippy le Grand Gourou
Skippy le Grand Gourou

Reputation: 7714

Not CentOS related but for Slackware I had to install a separate runc package.

Upvotes: 1

Ganesh Kumar
Ganesh Kumar

Reputation: 41

Please try this

Failure shim error: docker-runc not installed on system

cd /usr/libexec/docker/
cp docker-runc-current /usr/bin/docker-runc

Upvotes: 4

Drawn Yang
Drawn Yang

Reputation: 11

I tried Nabil Ghodbane's method, but it didn't work. Thanks to billabongrob's answer, I found a way to fix this problem. You can try this Docker config file:

$ cat /etc/docker/daemon.json
{
    "log-level":"warn",
    "hosts": ["unix:///var/run/docker.sock","tcp://0.0.0.0:2375"],
    "runtimes": {
        "docker-runc": {
            "path": "/usr/libexec/docker/docker-runc-current"
        }
    },
    "add-runtime": "docker-runc=/usr/libexec/docker/docker-runc-current",
    "default-runtime": "docker-runc"
}

or use this config in your command line .

Upvotes: 0

John Tee
John Tee

Reputation: 385

In reference to the top answer, introduce the sym link in /usr/bin to enable it in global path

sudo ln -s /usr/libexec/docker/docker-runc-current /usr/bin/docker-runc

Upvotes: 37

billabongrob
billabongrob

Reputation: 193

I know that this is a rather old question; however, this occured when I updated from CentOS - Extras docker to Docker's own docker-ce rpm. The service file located at /usr/lib/systemd/system/docker.service had the following lines hardcoded into the ExecStart line:

--add-runtime docker-runc=/usr/libexec/docker/docker-runc-current \
--default-runtime=docker-runc \
--exec-opt native.cgroupdriver=systemd \
--userland-proxy-path=/usr/libexec/docker/docker-proxy-current \

By default, the docker-ce package does not come with the same set of lines and the file paths are different. After upgrading I added the following and the containers respected my start commands with no data lost as expected:

 --add-runtime docker-runc=/usr/bin/docker-runc \
    --default-runtime=docker-runc \
    --exec-opt native.cgroupdriver=systemd \
    --userland-proxy-path=/usr/bin/docker-proxy

Hope this helps someone else!

Upvotes: 4

Nabil
Nabil

Reputation: 1223

It seems that the docker rpm misses some symbolic link in the end. As it was pointed to me, this issue was raised on:

https://access.redhat.com/solutions/2876431

and this can be easily fixed by:

cd /usr/libexec/docker/
sudo ln -s docker-runc-current docker-runc 

Upvotes: 33

Related Questions