服务器重启后启动Docker命令
启动步骤:
1、启动Docker 守护进程
systemctl daemon-reload
2、Docker启动命令:
systemctl start docker
3、查看docker服务是否启动
ps -ef |grep docker
4、查看docker启动的服务:
docker ps
其他:
重启docker服务
systemctl restart docker
停止docker服务
systemctl stop docker
重启服务器,docker内部mysql怎么重启启动
1、先重新启动服务器的docker
[rpin-docke ~]# sudo systemctl start docker
2、查看docker中运行的容器,包括运行中的和销毁的容器
[rpin-docke ~]# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
bd14b4db22c3 centos/mysql-57-centos7 "container-entrypoin…" 22 hours ago Exited (255) 11 minutes ago 0.0.0.0:3306->3306/tcp tensquar
3、重新启动mysql
[rpin-docke ~]# docker restart bd14b4db22c3
bd14b4db22c3
再次查看是否启动成功:
[rpin-docke ~]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
bd14b4db22c3 centos/mysql-57-centos7 "container-entrypoin…" 22 hours ago Up 8 seconds 0.0.0.0:3306->3306/tcp tensquare_mysql