Advertisement
opexxx

docker_alias

Mar 24th, 2015
420
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.16 KB | None | 0 0
  1. alias dklc='docker ps -l' # List last Docker container
  2. alias dklcid='docker ps -l -q' # List last Docker container ID
  3. alias dklcip="docker inspect `dklcid` | grep IPAddress | cut -d '\"' -f 4" # Get IP of last Docker container
  4. alias dkps='docker ps' # List running Docker containers
  5. alias dkpsa='docker ps -a' # List all Docker containers
  6. alias dki='docker images' # List Docker images
  7. alias dkrmac='docker rm $(docker ps -a -q)' # Delete all Docker containers
  8. alias dkrmlc='docker-remove-most-recent-container' # Delete most recent (i.e., last) Docker container
  9. alias dkrmui='docker rmi $(docker images | grep "^<none>" | awk "{print $3}")' # Delete all untagged Docker images
  10. alias dkrmli='docker-remove-most-recent-image' # Delete most recent (i.e., last) Docker image
  11. alias dkrmi='docker-remove-images' # Delete images for supplied IDs or all if no IDs are passed as arguments
  12. alias dkideps='docker-image-dependencies' # Output a graph of image dependencies using Graphiz
  13. alias dkre='docker-runtime-environment' # List environmental variables of the supplied image ID
  14. alias dkelc='docker exec -it `dklcid` bash' # Enter last container (works with Docker 1.3 and above)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement