docker daily summary of common operations command

a. docker ps view of the container running
b. docker ps -a view all containers
c. docker stop ID stop specified container
d. docker stop $ (docker ps -a -q) Stop all containers (-q to display only the container ID )
E. Docker RM $ (PS Docker -a -q) remove all containers
f. docker images to see all image
g. docker rmi ID (-f force delete deletes the specified image)
H. imagelD Docker rUN -d (daemon running containers formula )
i. Docker and submit changes that have been modified image

  • A .docker ps to see running container
  • B .docker exec -it containerID bash running into the container
  • C. To modify or update the code environment
  • D .exit exit
  • E .docker commit containerID myproject: v1.0.0.6 submit Mirror, named myproject, version v1.0.0.6

j. docker内存不足解决
sudo docker rm $(sudo docker ps -q -f status=exited)
sudo docker volume rm $(sudo docker volume ls -qf dangling=true)
sudo docker rmi $(sudo docker images --filter “dangling=true” -q --no-trunc)
k.pip和docker build使用代理
pip install xxxx --proxy=http://10.142.4.40:8000
docker build -t hrms:v1.0 --build-arg=http{,s}_proxy=http://10.136.0.60:8080 .

Guess you like

Origin blog.csdn.net/bocai_xiaodaidai/article/details/90780034