1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| docker images 或者 docker image ls
docker rmi <镜像Id> 或者 docker image rm <镜像Id>
docker rmi $(docker images -q)
docker rmi $(docker images | grep "none" | awk '{print $3}')
docker load
docker build docker build -t [镜像自定义名称] .
docker run [镜像ID] docker run -it --name [容器自定义名称] -d [镜像名称]:latest
docker save [镜像名称] | gzip > [保存文件名称]
docker load < [保存镜像文件名称]
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
| docker ps
docker ps -a
docker run [镜像名/镜像ID]
docker start [容器ID]
docker stop [容器ID]
docker kill [容器ID]
docker restart [容器ID]
docker rm [容器ID]
docker exec [容器ID]
docker export [容器ID]
docker import [路径]
docker logs [容器ID]
|
原文链接: http://yunzaifei.github.io/2024/01/03/Docker常用命令/
版权声明: 转载请注明出处.