Skip to content

docker-machine

  • Creates multiple nodes (with busybox linux)
  • Requires VM VirtualBox

ls

  • List all nodes
docker-machine ls

create

docker-machine create "my-node" # default node name is "default"
docker-machine create -d "virtualbox" --virtualbox-memory "4096" --virtualbox-cpu-count "2" "my-node"

start

docker-machine start "my-node"

stop

docker-machine stop "my-node"

rm

docker-machine rm "my-node"

ssh

  • SSH into a node
docker-machine ssh "my-node"

env

# Show environment variables
docker-machine env "my-node"

# Exec
docker-machine env "my-node" --shell "cmd"
docker-machine env "my-node" --shell "powershell"
# Switch to the specified node
eval $(docker-machine env "my-node")