Add plugin and alias for cleaning docker assets
This commit is contained in:
@@ -13,6 +13,13 @@ function docker-remove-most-recent-image() {
|
||||
docker images | head -2 | tail -1 | awk '{print $3}' | xargs docker rmi
|
||||
}
|
||||
|
||||
function docker-remove-stale-assets() {
|
||||
about 'attempt to remove exited containers and dangling images'
|
||||
group 'docker'
|
||||
docker ps --filter status=exited -q | xargs docker rm --volumes
|
||||
docker images --filter dangling=true -q | xargs docker rmi
|
||||
}
|
||||
|
||||
function docker-enter() {
|
||||
about 'enter the specified docker container using bash'
|
||||
group 'docker'
|
||||
|
||||
Reference in New Issue
Block a user