Last active
April 18, 2022 18:17
-
-
Save caffeinetiger/9341a526dce9283ef8597e7b96a81305 to your computer and use it in GitHub Desktop.
[Official documentation for docker image prune](https://docs.docker.com/engine/reference/commandline/image_prune/)
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 | |
| # Prune all unused images | |
| docker image prune --all | |
| # The filtering flag (--filter) format is of “key=value”. If there is more than one filter, then pass multiple flags | |
| docker image prune --filter "foo=bar" | |
| # For more details on the filter flag option see official documentation mentioned in the description | |
| # Prune all unused images with no confirmation | |
| docker image prune --all --force |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment