1.配置网络
[root@localhost ~]# nmtui
使其ping通外网
[root@localhost ~]# ping www.baidu.com
PING www.a.shifen.com (183.2.172.185) 56(84) bytes of data.
64 bytes from 183.2.172.185 (183.2.172.185): icmp_seq=1 ttl=51 time=18.7 ms
64 bytes from 183.2.172.185 (183.2.172.185): icmp_seq=2 ttl=51 time=18.9 ms
64 bytes from 183.2.172.185 (183.2.172.185): icmp_seq=3 ttl=51 time=18.8 ms
64 bytes from 183.2.172.185 (183.2.172.185): icmp_seq=4 ttl=51 time=19.7 ms
^C
--- www.a.shifen.com ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3005ms
rtt min/avg/max/mdev = 18.718/19.062/19.798/0.430 ms
2.安装docker
[root@localhost ~]# yum install -y wget
配置base源
[root@localhost ~]# wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
通过aliyun配置docker仓库
[root@centos ~]# yum install -y yum-utils
[root@centos ~]# yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
[root@centos ~]# yum install -y docker-ce-20.10.9-3.el7