Skip to content

Instantly share code, notes, and snippets.

@smarigowda
Last active September 18, 2016 16:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save smarigowda/4e1f916a3eff8264b8e6 to your computer and use it in GitHub Desktop.
Save smarigowda/4e1f916a3eff8264b8e6 to your computer and use it in GitHub Desktop.
Docker
-- 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