docker常用的命令

镜像相关的命令

docker images | ps -ef

docker rmi image_id

docker pull image_name:tag

docker search image_name

docker build -t image_naem:tag .

 

容器相关的命令

docker stop container_id

docker restart container_id

docker exec -it container_id /bin/bash

docker rm -f container_id

docker run -d -p 5000:5000 container_name image_name:tag

 

docker inspect container_id/image_id

 

docker服务相关的命令

systemctl  restart docker

systemctl  stop docker

systemctl  start docker

 

posted @ 2020-04-01 21:46  ~~~~~~~~~~~~~  阅读(115)  评论(0编辑  收藏  举报