follow the official documentation step by step
https://docs.docker.com/engine/install/centos/
1: uninstall the old version
sudo yum remove docker \
docker-client \
docker-client-latest \
docker-common \
docker-latest \
docker-latest-logrotate \
docker-logrotate \
docker-engine
2: download docker dependent packages and configure docker warehouse address
sudo yum install -y yum-utils
sudo yum-config-manager \
--add-repo \
https://download.docker.com/linux/centos/docker-ce.repo
3: install docker’s engine, operate docker’s client, and its container
sudo yum install docker-ce docker-ce-cli containerd.io
p>
after the execution of the installation is complete
start docker command:
sudo systemctl start docker
set docker startup:
sudo systemctl enable docker
p>
p>
view docker version:
docker -v
view docker image:
sudo docker images
p>
configure image acceleration: configure ali cloud
1: create directory
sudo mkdir -p /etc/docker
2: configure the mirror accelerator address
sudo tee /etc/docker/daemon.json <<-'EOF'
{
"registry-mirrors": ["https://17o3zxc0.mirror.aliyuncs.com"]
}
EOF
3: restart docker background thread
sudo systemctl daemon-reload
4: restart docker service
sudo systemctl restart docker
p>
p>
div>
Read More:
- docker: error pulling image configuration:timeout
- The installation of docker desktop failed. After successful installation, the docker can not be started
- Docker starts the image and reports an error. Iptables failed: iptables — wait – t NAT – a docker – P TCP
- [extremely simple and effective] installing docker under centos6. X
- Constructing docker image of multi arch
- Error reported when Windows builds docker image: failed to create LLB definition: 403 Forbidden
- Docker CentOS Failed to get D-Bus connection: Operation not permitted
- [Sovled] Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
- Error: path not specified when the docker 1.7 file is uploaded to the container in CentOS
- CentOS 8.2 installation-solve Error setting up base repository
- Vscode configuration connection server docker write code
- Vacuum box installation CentOS encountered the pit
- CentOS 7 installation error: Cannot find a valid baseurl for repo: base/7/x86_6
- docker: Error response from daemon: Get https://registry-1.docker.io/v2/: net/http: request canceled
- [Win 10] Docker Error: error during connect: In the default daemon configuration on Windows
- Jenkins series installation and deployment in docker mode
- [docker] error in deleting image: image is referenced in multiple repositories
- emulator: ERROR: x86 emulation currently requires hardware acceleration! Abnormal problem solved
- Raspberry Pi 3 installation and software configuration issues collection
- Centos7 offline installation of redis and PHP extension redis