1、docker服务的基本操作
1.1、查看docker状态
[root@localhost docker]# systemctl status docker
1.2、启动docker服务
[root@localhost docker]# systemctl start docker
1.3、停止docker服务
[root@localhost docker]# systemctl stop docker
1.4、重新启动docker服务
[root@localhost docker]# systemctl restart docker
1.5、设置docker开机自启
[root@localhost docker]# systemctl enable docker
1.6、禁止docker开机自启
[root@localhost docker]# systemctl disable docker
1.7、查看docker信息
[root@localhost docker]# docker info
查看docker info中具体key的信息,例如:
[root@localhost docker]# docker info | grep 'Docker Root Dir:'