Skip to content

Instantly share code, notes, and snippets.

Last active Jun 24, 2019
What would you like to do?
Docker aliases / helper function
alias dip="docker inspect -f '{{ .NetworkSettings.IPAddress }}'"
dssh() {
PID=$(docker inspect --format {{.State.Pid}} $1)
sudo /usr/bin/nsenter --target $PID --mount --uts --ipc --net --pid env -i - $(sudo cat /proc/$PID/environ | xargs -0) bash
drmiall() {
docker rmi `docker images -q -f dangling=true`
drmall() {
docker rm `docker ps -a -q`
Copy link

vaceletm commented Sep 10, 2014

Why not using docker rmi docker images -q -f dangling=true for drmiall ?

Copy link

goldmann commented Sep 11, 2014

Most probably because I created these before Docker added support for this :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment