一、检查 Linux 上是有存在 docker
[root@localhost bin]# docker version
不存在 docker 时,可以使用如下命令下载 docker
[root@localhost local]# yum -y install docker
在使用 docker 版本检查命令—会有如下对应下载 docker 的相关信息:
[root@localhost bin]# docker version Client: Version: 1.13.1 API version: 1.26 Package version: docker-1.13.1-161.git64e9980.el7_8.x86_64 Go version: go1.10.3 Git commit: 64e9980/1.13.1 Built: Tue Apr 28 14:43:01 2020 OS/Arch: linux/amd64 Server: Version: 1.13.1 API version: 1.26 (minimum version 1.12) Package version: docker-1.13.1-161.git64e9980.el7_8.x86_64 Go version: go1.10.3 Git commit: 64e9980/1.13.1 Built: Tue Apr 28 14:43:01 2020 OS/Arch: linux/amd64 Experimental: false
二、进行 docker 状态检查 看是否开启,如果未启动,请重新启动即可。
[root@localhost local]# service docker restart Redirecting to /bin/systemctl restart docker.service
检查当前 docker 的状态情况:
[root@localhost local]# service docker status Redirecting to /bin/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 一 2020-06-08 16:38:36 CST; 7s ago Docs: http://docs.docker.com
..........
..........
看到 docker 已经启动,接下来我们可以使用相关 docker 命令进行操作了呀 ~