I hereby claim:
- I am m-wendler on github.
- I am mwendler (https://keybase.io/mwendler) on keybase.
- I have a public key ASBwk4WpDZ-VLhvJ_drkE70hhrlQU0MyMP3sevgOvbg69wo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
# customize the 'ps' command (see https://docs.docker.com/engine/reference/commandline/ps/) | |
docker ps --format "table {{.ID}}\t{{.Names}}\t{{.Status}}\t{{.Command}} | |
# I also put it into an alias: | |
alias dps='docker ps --format "table {{.ID}}\t{{.Names}}\t{{.Status}}\t{{.Command}}"' |
docker rmi $(docker images -q -f dangling=true) |
# '-q' will list just IDs | |
docker images -q -f dangling=true |
# stop and remove all docker hosts with these names | |
for H in staging prod; do | |
docker-machine stop $H; | |
docker-machine rm -y $;H # pass -y to automatically confirm the removal | |
done | |
# OR: one-liner | |
for H in staging prod; do docker-machine stop $N; docker-machine rm -y $N; done |
# the '-q' option returns just the container IDs | |
docker rm $(docker ps -a -q -f status=exited) |
# '-f' lets you filter for a particular status | |
docker ps -a -f status=exited |
# create 3 docker hosts on virtualbox | |
for N in 1 2 3; do | |
docker-machine create -d virtualbox node-$N; | |
done | |
# OR: one-liner: | |
for N in 1 2 3; do docker-machine create -d virtualbox node-$N; done |