Last active
August 13, 2017 15:43
-
-
Save alexleekt/750ec9cf4dee17ad7169dc866e8ba801 to your computer and use it in GitHub Desktop.
Docker cheatsheet
This file contains 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
# Update all docker images | |
docker images | grep -v REPOSITORY | awk ‘{print $1}’ | xargs -L1 docker pull | |
# Get command of running containers | |
docker inspect -f "{{.Name}} {{.Config.Cmd}}" $(docker ps -a -q) | |
# Remove unused images | |
docker images -q | xargs docker rmi | |
# Remove stopped dockers | |
docker ps -aq -f status=exited | xargs docker rm |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment