rasti.hil@hilandco.com +41 79 367-9677

How to install Docker CE (community edition): on RHEL 7

install steps

yum remove docker docker-common docker-selinux docker-engine
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
yum -y install http://mirror.centos.org/centos/7/extras/x86_64/Packages/container-selinux-2.107-3.el7.noarch.rpm
yum install docker-ce
groupadd docker
usermod -aG docker $USER
systemctl enable docker
systemctl start docker

install docker-compose

yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum install -y python-pip python-devel gcc
pip install --upgrade pip
pip uninstall docker docker-py docker-compose
pip install docker-compose

test docker 

docker run hello-world

in case of update 

cd /var/lib/docker/containers
sed -i "s/docker-runc//g"  $(grep  -rl "docker-run")
systemctl restart docker

in case of conflict with existing network

vi /etc/docker/daemon.json
"data-root": "/data01/docker/",
 "bip": "",
"default-address-pools": [ {"base":"","size":28} ],

systemctl daemon-reload
systemctl restart docker

in case of proxy restriction

mkdir -p /etc/systemd/system/docker.service.d

vi /etc/systemd/system/docker.service.d/http-proxy.conf


systemctl daemon-reload
systemctl restart docker

 How do I enable the remote API for dockerd

vi /etc/systemd/system/docker.service.d/startup_options.conf
ExecStart=/usr/bin/dockerd -H fd:// -H tcp://

systemctl daemon-reload
systemctl restart docker.service