Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Clean up docker environment
# deletes all docker containers
docker rm $(docker ps --no-trunc -aq)
# deletes dangling docker images (older version of the images)
docker images -q -f "dangling=true"
# deletes all docker images
docker rmi $(docker images -q)
# list all docker images
docker image ls -a
# list all docker containers
docker container ls -a
# you can pre-dwonload the docker images if you want
docker pull mysql
docker pull openjdk:8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment