Updated undescores to dashes and added new alias

pull/403/head
Kevin S. Clarke 2015-01-27 15:14:18 -05:00
parent ed79936529
commit ef0f7ebc42
2 changed files with 8 additions and 7 deletions

View File

@ -11,6 +11,7 @@ alias dkrmac='docker rm $(docker ps -a -q)' # Delete all Docker containers
alias dkrmlc='docker-remove-most-recent-container' # Delete most recent (i.e., last) Docker container alias dkrmlc='docker-remove-most-recent-container' # Delete most recent (i.e., last) Docker container
alias dkrmui='docker rmi $(docker images | grep "^<none>" | awk "{print $3}")' # Delete all untagged Docker images alias dkrmui='docker rmi $(docker images | grep "^<none>" | awk "{print $3}")' # Delete all untagged Docker images
alias dkrmli='docker-remove-most-recent-image' # Delete most recent (i.e., last) Docker image alias dkrmli='docker-remove-most-recent-image' # Delete most recent (i.e., last) Docker image
alias dkrmi='docker_remove_images' # Delete images for supplied IDs or all if no IDs are passed as arguments alias dkrmi='docker-remove-images' # Delete images for supplied IDs or all if no IDs are passed as arguments
alias dkideps='docker_image_dependencies' # Output a graph of image dependencies using Graphiz alias dkideps='docker-image-dependencies' # Output a graph of image dependencies using Graphiz
alias dkre='docker_runtime_environment' # List environmental variables of the supplied image ID alias dkre='docker-runtime-environment' # List environmental variables of the supplied image ID
alias dkelc='docker exec -it `dklcid` bash' # Enter last container (works with Docker 1.3 and above)

View File

@ -24,7 +24,7 @@ function docker-remove-most-recent-image() {
docker images | head -2 | tail -1 | awk '{print $3}' | xargs docker rmi docker images | head -2 | tail -1 | awk '{print $3}' | xargs docker rmi
} }
function docker_remove_images() { function docker-remove-images() {
about 'attempt to remove images with supplied tags or all if no tags are supplied' about 'attempt to remove images with supplied tags or all if no tags are supplied'
group 'docker' group 'docker'
if [ -z "$1" ]; then if [ -z "$1" ]; then
@ -39,7 +39,7 @@ function docker_remove_images() {
fi fi
} }
function docker_image_dependencies() { function docker-image-dependencies() {
about 'attempt to create a Graphiz image of the supplied image ID dependencies' about 'attempt to create a Graphiz image of the supplied image ID dependencies'
group 'docker' group 'docker'
if hash dot 2>/dev/null; then if hash dot 2>/dev/null; then
@ -58,7 +58,7 @@ function docker_image_dependencies() {
fi fi
} }
function docker_runtime_environment() { function docker-runtime-environment() {
about 'attempt to list the environmental variables of the supplied image ID' about 'attempt to list the environmental variables of the supplied image ID'
group 'docker' group 'docker'
docker run "$@" env docker run "$@" env