#删除以前的docker
yum remove docker-*
#这是必须的 需要把软件更新到最新状态
yum update
#删除docker
rm -rf /etc/docker/
#使用yum 安装docker
sudo yum install docker
#如果上面没有报错 可以直接启动
systemctl start docker
#查看docker信息
docker info
#查看docker 状态 active running 就是说明 docker已经搞定了
systemctl status docker.service
● docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled)
Active: active (running) since 日 2022-05-08 21:52:33 EDT; 23h ago
Docs: http://docs.docker.com
Main PID: 55127 (dockerd-current)
CGroup: /system.slice/docker.service
├─55127 /usr/bin/dockerd-current --add-runtime docker-runc=/usr/libexec/docker/docker-runc-current --default-runtime=docker-runc --exec-opt native.cgroupdriver=system...
└─55132 /usr/bin/docker-containerd-current -l unix:///var/run/docker/libcontainerd/docker-containerd.sock --metrics-interval=0 --start-timeout 2m --state-dir /var/run...
5月 08 21:52:33 localhost.localdomain dockerd-current[55127]: time="2022-05-08T21:52:33.092888652-04:00" level=warning msg="Docker could not enable SELinux on the host system"
5月 08 21:52:33 localhost.localdomain dockerd-current[55127]: time="2022-05-08T21:52:33.191919621-04:00" level=info msg="Graph migration to content-addressability took... seconds"
5月 08 21:52:33 localhost.localdomain dockerd-current[55127]: time="2022-05-08T21:52:33.192457388-04:00" level=info msg="Loading containers: start."
5月 08 21:52:33 localhost.localdomain dockerd-current[55127]: time="2022-05-08T21:52:33.276258177-04:00" level=info msg="Firewalld running: false"
5月 08 21:52:33 localhost.localdomain dockerd-current[55127]: time="2022-05-08T21:52:33.437346179-04:00" level=info msg="Default bridge (docker0) is assigned with an I... address"
5月 08 21:52:33 localhost.localdomain dockerd-current[55127]: time="2022-05-08T21:52:33.494067339-04:00" level=info msg="Loading containers: done."
5月 08 21:52:33 localhost.localdomain dockerd-current[55127]: time="2022-05-08T21:52:33.585854855-04:00" level=info msg="Daemon has completed initialization"
5月 08 21:52:33 localhost.localdomain dockerd-current[55127]: time="2022-05-08T21:52:33.585881734-04:00" level=info msg="Docker daemon" commit="7d71120/1.13.1" graphdr...on=1.13.1
5月 08 21:52:33 localhost.localdomain systemd[1]: Started Docker Application Container Engine.
5月 08 21:52:33 localhost.localdomain dockerd-current[55127]: time="2022-05-08T21:52:33.595107314-04:00" level=info msg="API listen on /var/run/docker.sock"
Hint: Some lines were ellipsized, use -l to show in full.
CentOS7安装docker
最新推荐文章于 2024-11-16 08:09:50 发布