Install Docker Engine on CentOS

Official documentation

https://docs.docker.com/engine/install/centos/

https://www.cherryservers.com/blog/install-docker-ubuntu-22-04
https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-compose-on-ubuntu-22-04

Install

1. Uninstall old versions

Older versions of Docker were called docker or docker-engine. If these are installed, uninstall them, along with associated dependencies.

1
2
3
4
5
6
7
8
yum remove docker \
docker-client \
docker-client-latest \
docker-common \
docker-latest \
docker-latest-logrotate \
docker-logrotate \
docker-engine

2. Set up the repository

1
2
3
4
5
yum install -y yum-utils

yum-config-manager \
--add-repo \
https://download.docker.com/linux/centos/docker-ce.repo

3. Install Docker Engine

1
yum install -y docker-ce docker-ce-cli containerd.io

4. Start the Docker service and add it to autorun

1
systemctl enable --now docker

Install Docker Engine on CentOS
https://www.hardyhu.cn/2022/01/23/Install-Docker-Engine-on-CentOS/
Author
John Doe
Posted on
January 23, 2022
Licensed under