Last active
July 18, 2016 12:32
-
-
Save tdomzal/0c9aedcd3d263114a9acc4e49470d1fe to your computer and use it in GitHub Desktop.
Docker snippets
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# remove dangling images | |
docker images --quiet --filter=dangling=true | xargs --no-run-if-empty docker rmi | |
# list container ids created from specified image | |
docker ps -a -f "ancestor=nginx:latest" --format "{{.ID}}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment