Skip to main content

some use full command

Published 1 min readMarkdown
To restart all images.
docker restart $(docker ps -aq)

To remove all Docker images in one shot
docker rmi -f $(docker images -q)

remove all containers first (to ensure images can be deleted):
docker rm -f $(docker ps -aq) && docker rmi -f $(docker images -q)

Last 20-30 logs of docker container
docker logs <container id> --tail 30

No comments yet. Be the first to comment.