linux下docker相关命令
# 启动docker
service docker start
# 关闭douker
service docker stop
# 查看docker详细信息
docker info
# 获取当前节点所有容器
docker ps -a
# 管理容器生命周期
docker [start|stop|restart] <containerID|containerName>
# 查看容器日志
docker logs <containerID|containerName>
# 查看容器详细信息
docker inspect [containerID|imageID]
# 进入容器
docker exec -it <containerID|containerName> /bin/sh
# 删除容器
docker rm -f <containerID|containerName>
# 删除镜像
docker rmi -f <imageID|imageName:tag>
# 查看正在运行的容器资源使用情况
docker stats <containerID|containerName>
# 显示容器中正在运行的进程
docker top <containerID|containerName>
#docker-compose 启动一组容器
sudo docker-compose -f mysql-compose.yml up -d