-
Notifications
You must be signed in to change notification settings - Fork 3
/
.docker-a
30 lines (23 loc) · 800 Bytes
/
.docker-a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Convenient aliases for Docker
alias dls='docker image ls '
alias drm='docker image rm '
alias dri='docker run -it '
alias drmc='docker container rm '
alias dps='docker container ls -a'
alias dstop='docker container stop '
alias dkill='docker container rm -f '
alias dcon='docker exec -it '
# from https://github.com/nickjj/dotfiles/blob/master/.aliases as suggested by Raju Gandhi
dhtags () {
local image="${1}"
wget -q https://registry.hub.docker.com/v1/repositories/"${image}"/tags -O - \
| tr -d '[]" ' | tr '}' '\n' | awk -F: '{print $3}'
}
dpurge () {
docker container stop $(docker ps -aq)
docker container rm $(docker ps -aq)
}
# ref: https://github.com/justincormack/nsenter1
ddvm() {
docker run -it --rm --privileged --pid=host justincormack/nsenter1
}