Last active
September 18, 2016 16:58
-
-
Save smarigowda/4e1f916a3eff8264b8e6 to your computer and use it in GitHub Desktop.
Docker
This file contains 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 machine commands | |
docker-machine | |
docker-machine ls | |
docker-machine -v | |
docker-machine env | |
docker-machine env staging | |
$(docker-machine env staging) -- sets the environment variables | |
or | |
eval "$(docker-machine env staging)" -- load the Machine configuration into your shell | |
docker-machine env dev | |
docker run busybox echo hello world | |
docker-machine ip | |
docker-machine stop | |
docker-machine start | |
docker-machine stop dev | |
docker-machine start dev | |
docker-machine create \ | |
--driver digitalocean \ | |
--digitalocean-access-token $DOTOKEN \ | |
staging | |
~/.docker/machines -- client's directory | |
docker-machine active dev | |
docker-machine rm dev staging | |
docker-machine create --url=tcp://xx.xx.xx.xx:2376 custombox -- adding host without driver but just url | |
docker-machine ssh staging | |
echo 'bob_the_container dameon_dave dameon.dave' | xargs sudo docker inspect --format '{{ .Name }} {{ .State.Running }}' | |
sudo docker stats `sudo docker ps -a -q` | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment