一.执行涉及到的命令
[root@localhost ~]# uname -r
3.10.0-862.el7.x86_64
[root@localhost ~]# yum install docker
Loaded plugins: fastestmirror, langpacks
Determining fastest mirrors
* base: mirrors.tuna.tsinghua.edu.cn
* extras: mirrors.tuna.tsinghua.edu.cn
* updates: mirrors.tuna.tsinghua.edu.cn
Resolving Dependencies
。。。。。。。
Dependency Updated:
libselinux.x86_64 0:2.5-15.el7 libselinux-python.x86_64 0:2.5-15.el7 libselinux-utils.x86_64 0:2.5-15.el7 libsemanage.x86_64 0:2.5-14.el7
libsemanage-python.x86_64 0:2.5-14.el7 libsepol.x86_64 0:2.5-10.el7 policycoreutils.x86_64 0:2.5-34.el7 policycoreutils-python.x86_64 0:2.5-34.el7
selinux-policy.noarch 0:3.13.1-268.el7_9.2 selinux-policy-targeted.noarch 0:3.13.1-268.el7_9.2 setools-libs.x86_64 0:3.3.8-4.el7
Complete!
[root@localhost ~]# systemctl start docker
[root@localhost ~]# docker -v
Docker version 1.13.1, build 0be3e21/1.13.1
[root@localhost ~]# systemctl enable docker
Created symlink from /etc/systemd/system/multi-user.target.wants/docker.service to /usr/lib/systemd/system/docker.service.
[root@localhost ~]# systemctl status docker
● docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled)
Active: active (running) since Wed 2021-02-24 21:37:50 CST; 37s ago
Docs: http://docs.docker.com
Main PID: 3846 (dockerd-current)
CGroup: /system.slice/docker.service
├─3846 /usr/bin/dockerd-current --add-runtime docker-runc=/usr/l...
└─3851 /usr/bin/docker-containerd-current -l unix:///var/run/doc...
Feb 24 21:37:48 localhost.localdomain dockerd-current[3846]: time="2021-02-...
Feb 24 21:37:49 localhost.localdomain dockerd-current[3846]: time="2021-02-...
Feb 24 21:37:49 localhost.localdomain dockerd-current[3846]: time="2021-02-...
Feb 24 21:37:49 localhost.localdomain dockerd-current[3846]: time="2021-02-...
Feb 24 21:37:50 localhost.localdomain dockerd-current[3846]: time="2021-02-...
Feb 24 21:37:50 localhost.localdomain dockerd-current[3846]: time="2021-02-...
Feb 24 21:37:50 localhost.localdomain dockerd-current[3846]: time="2021-02-...
Feb 24 21:37:50 localhost.localdomain dockerd-current[3846]: time="2021-02-...
Feb 24 21:37:50 localhost.localdomain systemd[1]: Started Docker Applicatio...
Feb 24 21:37:50 localhost.localdomain dockerd-current[3846]: time="2021-02-...
Hint: Some lines were ellipsized, use -l to show in full.
[root@localhost ~]#