in Deployment

Useful docker commands

Just several useful commands for Docker, which can save some disk space.

stop all containers:
docker kill $(docker ps -q)

remove all containers
docker rm $(docker ps -a -q)

remove all docker images
docker rmi $(docker images -q)

remove all docker volumes
docker volume ls -qf dangling=true | xargs -r docker volume rm

Docker-Clean – A simple Shell script to clean up the Docker Daemon:
https://github.com/ZZROTDesign/docker-clean

Write a Comment

Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.