Created
January 23, 2018 21:01
-
-
Save sylwit/8ad1f9ea9f85b3c804d1bba042a668f7 to your computer and use it in GitHub Desktop.
Alias for docker
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
| function docker.clean_containers() { | |
| docker rm $(docker ps -a | grep -v Up | grep -v CONTAINER | cut -f 1 -d ' ') | |
| } | |
| function docker.clean_images() { | |
| docker rmi $(docker images | grep none | tr -s ' ' | cut -f 3 -d ' ') | |
| } | |
| function docker.clean_volumes() { | |
| docker volume rm $(docker volume ls -qf dangling=true) | |
| } | |
| function docker.bash() { | |
| docker exec -ti $1 bash | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment