Docker Machine is a CLI utility for provisioning and managing Docker hosts on local and remote infrastructure. It configures the Docker client to simplify switching between environments.
Installation
open_in_new Releases on GitHub
docker-machine create
Create a Docker host in the cloud:
docker-machine create --driver digitalocean --digitalocean-access-token <token> \
identihost-do
Configure the local client to talk to the host:
# Print environment variables:
docker-machine env identihost-do
# Apply to the current shell session:
eval "$(docker-machine env identihost-do)"
# Verify which host the client points to:
docker info
If you see an SSL error:
ERROR: SSL error: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:661)
Set:
export COMPOSE_TLS_VERSION=TLSv1_2
docker-machine ls
List running hosts.
docker-machine ls
docker-machine ip
Find the IP address of a Docker host:
curl $(docker-machine ip identihost-do):5000
Andrew Dorokhov