Mercurial > hg > zsh-env
comparison zshrc-docker @ 141:fe986adeadeb
add more helper functions
author | Dirk Olmes <dirk@xanthippe.ping.de> |
---|---|
date | Thu, 05 Jul 2018 04:58:14 +0200 |
parents | 8b961f7d78d9 |
children | bb583ebb33e6 |
comparison
equal
deleted
inserted
replaced
140:abc3d303adde | 141:fe986adeadeb |
---|---|
8 alias doc="docker-compose" | 8 alias doc="docker-compose" |
9 alias doker=docker | 9 alias doker=docker |
10 alias dpa="docker ps -a --format 'table {{.ID}}\t{{.Image}}\t{{.Status}}\t{{.Names}}'" | 10 alias dpa="docker ps -a --format 'table {{.ID}}\t{{.Image}}\t{{.Status}}\t{{.Names}}'" |
11 | 11 |
12 dex() { docker exec -it $1 /bin/sh } | 12 dex() { docker exec -it $1 /bin/sh } |
13 | |
14 docker_remove_obsolete_images() { | |
15 docker rmi $(docker images --format 'table {{.Repository}} {{.ID}}' | grep -e '^<none>' | awk '{ print $2 }') | |
16 } | |
17 | |
18 docker_remove_exited_containers() { | |
19 docker rm $(docker ps -a | grep "Exited" | awk '{print $(NF)}') | |
20 } |