download docker centos code example
Example 1: install docker centos 8
dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo
Example 2: install docker on centos
sudo yum install -y yum-utils
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
sudo yum install docker-ce docker-ce-cli containerd.io
sudo systemctl start docker
sudo docker run hello-world
Example 3: install docker centos 7
$ sudo yum remove docker \
docker-client \
docker-client-latest \
docker-common \
docker-latest \
docker-latest-logrotate \
docker-logrotate \
docker-engine