Installing Docker on various systems


Setup docker using the official docker repo, not EPEL.

Check that docker is not installed already,

ls -al /etc/yum.repos.d/
rpm -qa | grep -i docker

Install Docker Engine Community Edition on CentOS,

yum install -y yum-utils device-mapper-persistent-data lvm2
yum-config-manager \
    --add-repo \
yum makecache fast
yum install -y docker-ce
systemctl list-unit-files | grep docker
systemctl status docker
systemctl start docker
systemctl enable docker
usermod -a -G docker USER


grab the latest also available on github as release tag

#git clone
tar xzf docker-19.03.13.tgz
cp docker/* /usr/local/bin/

and if you also need Compose,

git clone
cd compose/
pip install -U -r requirements.txt
python install

enable Docker CE (rc.local),

echo -n dockerd:
nohup /usr/local/bin/dockerd > /root/dockerd.log 2> /root/dockerd.error.log &
pgrep -a docker
docker ps -a

and (rc.local_shutdown),

echo -n killing dockerd...
pkill dockerd && echo done || echo FAIL



Docker CE,

apt-get remove docker docker-engine
apt-get autoremove
dpkg -l | grep ^rc

apt-get install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL | sudo apt-key add -
#apt-key fingerprint 0EBFCD88
add-apt-repository "deb [arch=amd64] `lsb_release -cs` stable"
apt-get install docker-ce

docker ps -a,

apt update
apt install
systemctl list-unit-files | grep docker
systemctl enable docker.socket
systemctl enable docker.service
systemctl status docker
usermod -a -G docker USER

Re-locate the docker files

    systemctl stop docker.service
    systemctl stop docker.socket

mv /var/lib/docker/ /data/docker/
ln -s ../../data/docker /var/lib/docker

    systemctl start docker.socket
    systemctl start docker.service

Ready to go

Check that everything works, as user,

docker ps


Install Docker Engine from binaries