# Docker shim error on CentOS 7

**URL:** <https://meta.discourse.org/t/docker-shim-error-on-centos-7/77686>\
**Category:** Support\
**Created:** [Janvier 10, 2018, 5:55 UTC](https://meta.discourse.org/t/docker-shim-error-on-centos-7/77686 "2018-01-10T17:55:19Z")\
**Posts on this page:** 1\
**Showing post:** 14

<div class="post-metadata">

**Author:** ![dnsmichi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dnsmichi/32/379505_2.png) [@dnsmichi](https://meta.discourse.org/u/dnsmichi)\
**Post date:** [Janvier 10, 2018, 10:15 UTC](https://meta.discourse.org/t/docker-shim-error-on-centos-7/77686/14 "2018-01-10T22:15:07Z")

</div>

Hmmm. It seems that `docker` is actually a script which performs a lookup for possible paths. But only on RHEL/CentOS 7 where this comes from the RHEL repositories.

I don’t have `/usr/bin/docker-current` here.

```plaintext
[root@icinga2 ~]# docker -v
Docker version 17.12.0-ce, build c97c6d6

```

```plaintext
[root@icinga2 ~]# ps aux | grep docker
root 20688 0.9 1.9 542268 35964 ? Ssl 20:56 0:37 /usr/bin/dockerd
root 20693 0.7 1.2 366356 22872 ? Ssl 20:56 0:29 docker-containerd --config /var/run/docker/containerd/containerd.toml
root 29081 0.0 0.0 112668 944 pts/0 S+ 22:05 0:00 grep --color=auto docker

```

Systemd starts `dockerd` here, you can see that from the service file in `/lib/systemd/system/docker.service`:

```plaintext
[Unit]
Description=Docker Application Container Engine
Documentation=https://docs.docker.com
After=network-online.target firewalld.service
Wants=network-online.target

[Service]
Type=notify
# the default is not to use systemd for cgroups because the delegate issues still
# exists and systemd currently does not support the cgroup feature set required
# for containers run by docker
ExecStart=/usr/bin/dockerd
ExecReload=/bin/kill -s HUP $MAINPID
# Having non-zero Limit*s causes performance problems due to accounting overhead
# in the kernel. We recommend using cgroups to do container-local accounting.
LimitNOFILE=infinity
LimitNPROC=infinity
LimitCORE=infinity
# Uncomment TasksMax if your systemd version supports it.
# Only systemd 226 and above support this version.
#TasksMax=infinity
TimeoutStartSec=0
# set delegate yes so that systemd does not reset the cgroups of docker containers
Delegate=yes
# kill only the docker process, not all processes in the cgroup
KillMode=process
# restart the docker process if it exits prematurely
Restart=on-failure
StartLimitBurst=3
StartLimitInterval=60s

[Install]
WantedBy=multi-user.target

```

Do you have any other occurrences of a Systemd service file for docker, e.g. in /etc/systemd?

Anyhow, I’d suggest to start “fresh”. Purge anything which has docker in its name from the system

```plaintext
yum remove docker \
                  docker-common \
                  docker-selinux \
                  docker-engine

find /etc/systemd -name '*docker*' -exec rm -f {} \;
find /lib/systemd -name '*docker*' -exec rm -f {} \;

```

and go for installing it using [this guide](https://docs.docker.com/engine/installation/linux/docker-ce/centos/) again.

---

_[View the full topic](https://meta.discourse.org/t/docker-shim-error-on-centos-7/77686)._
