Add a few new docker aliases
parent
e10539bb6b
commit
e43f516439
|
|
@ -11,3 +11,15 @@ if [[ `uname -s` == "Darwin" ]]; then
|
|||
boot2docker ssh -t sudo "/var/lib/boot2docker/docker-enter \"$1\""
|
||||
}
|
||||
fi
|
||||
|
||||
function docker-remove-most-recent-container() {
|
||||
about 'attempt to remove the most recent container from docker ps -a'
|
||||
group 'docker'
|
||||
docker ps -a | head -2 | tail -1 | awk '{print $NF}' | xargs docker rm
|
||||
}
|
||||
|
||||
function docker-remove-most-recent-image() {
|
||||
about 'attempt to remove the most recent image from docker images'
|
||||
group 'docker'
|
||||
docker images | head -2 | tail -1 | awk '{print $3}' | xargs docker rmi
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue