Installing Docker on various systems

note this guide is unused as we rather install Docker CE on slackware linux instead

Install

Setup docker using the official docker repo, not Ubuntu packages nor EPEL.

debian / ubuntu

dpkg -l | grep docker # no distro package

apt install apt-transport-https ca-certificates curl software-properties-common

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | \
    gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg

vi /etc/apt/sources.list.d/docker.list

# ubuntu
deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu hirsute stable

# debian
deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian buster stable

–or– (another way around)

apt-get remove docker docker-engine docker.io

add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu `lsb_release -cs` stable"

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -

apt-key fingerprint 0EBFCD88

and proceed with the installation

apt update
apt install docker-ce docker-ce-cli containerd.io

rhel/centos

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

yum install -y yum-utils device-mapper-persistent-data lvm2
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
yum makecache fast
yum install -y docker-ce
systemctl list-unit-files | grep docker
systemctl status docker
systemctl start docker
systemctl enable docker

Operations

    systemctl restart docker.socket
    systemctl restart docker.service

    systemctl status docker.socket
    systemctl status docker.service

    systemctl stop docker.service
    systemctl stop docker.socket

Additional notes

and if you also need Compose,

git clone https://github.com/docker/compose.git
cd compose/
pip install -U -r requirements.txt
python setup.py install

Resources

download

https://download.docker.com/linux/static/stable/x86_64/

https://github.com/docker/docker-ce/tags

install

https://docs.docker.com/engine/installation/linux/docker-ce/binaries/#prerequisites

Install Docker Engine https://docs.docker.com/engine/install/

Install Docker Engine on Ubuntu https://docs.docker.com/engine/install/ubuntu/

https://docs.docker.com/install/linux/docker-ce/ubuntu/

https://docs.docker.com/engine/installation/linux/docker-ce/centos/#install-using-the-repository

Post-installation steps for Linux https://docs.docker.com/engine/install/linux-postinstall/


HOME | GUIDES | LECTURES | LAB | SMTP HEALTH | NU | HTML5
Copyright © 2022 Pierre-Philipp Braun