1、更新系统组件
sudo yum update
2、增加国内 docker 源
sudo yum install -y yum-utils device-mapper-persistent-data lvm2
sudo yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
sudo yum update
3、下载 container.io
wget https://download.docker.com/linux/centos/7/x86_64/stable/Packages/containerd.io-1.3.7-3.1.el7.x86_64.rpm
# 因为 docker.com 下载很慢,可以手动从列表中通过代理下载:https://download.docker.com/linux/centos/7/x86_64/stable/Packages/
# 然后再上传到服务器本地执行下面语句
yum install containerd.io-1.3.7-3.1.el7.x86_64.rpm
4、安装 docker
sudo yum install docker-ce docker-ce-cli containerd.io
5、启动 docker
sudo systemctl start docker
6、测试容器
sudo docker run hello-world
7、如果拉取容器有困难,请配置国内源
https://www.cnblogs.com/xwgli/p/12287556.html
8、测试容器内对外部网络访问情况
docker run --rm busybox nslookup baidu.com
9、设置 docker 自启
sudo systemctl enable docker
10、检查自启状态
systemctl list-unit-files | grep docker
11、图形化管理
https://www.cnblogs.com/xwgli/p/10998923.html
12、资源监控
https://www.cnblogs.com/xwgli/p/13570897.html