Docker安装
官方文档:
https://docs.docker.com/engine/install/centos/
1、先卸载旧版本
sudo yum remove docker \ docker-client \ docker-client-latest \ docker-common \ docker-latest \ docker-latest-logrotate \ docker-logrotate \ docker-engine
2、安装yum-utils 添加官方镜像源
sudo yum install -y yum-utils sudo yum-config-manager \ --add-repo \ https://download.docker.com/linux/centos/docker-ce.repo
3、安装
sudo yum install docker-ce docker-ce-cli containerd.io
4、启动docker
sudo systemctl start docker
5、运行docker ps
root_D-v024@:~# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
6、修改docker镜像源为国内地址
vi /etc/docker/daemon.json { "registry-mirrors": ["http://hub-mirror.c.163.com"] }