Last active
July 17, 2017 02:38
-
-
Save tonykwon/884c25927a75649cad07 to your computer and use it in GitHub Desktop.
Docker Tips
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ docker stop $(docker ps -a -q) | |
$ docker rm $(docker ps -a -q) | |
# if it is sluggish and has issues fetching stuff via network | |
# | |
$ docker-machine restart default # Restart the environment | |
$ eval $(docker-machine env default) # Refresh your environment settings | |
# get the container ID of by container Name | |
# | |
docker ps -a | grep lloyddev_web | awk '{print $1}' | |
# grab container ID to fire up docker stats command | |
# | |
docker stats `docker ps -a | grep lloyddev_web | awk '{print $1}'` | |
# show all stats | |
# | |
docker stats `docker ps -a | awk '{if (NR!=1) {print $1}}' | xargs | sed -e 's/ / /g'` | |
# Vagrant | |
VBoxManage list vms | grep '_vhosts_boot2docker' | sed -e 's/^[^{]*{\([^{}]*\)}.*/\1/' | |
VBoxManage list vms | grep '_vhosts_boot2docker' | sed -e 's/^[^{]*{\([^{}]*\)}.*/\1/' > /Users/tonykwon/SH/_vhosts/.vagrant/machines/boot2docker/virtualbox/id |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment