arrow_back
Back

Docker Machine: provisioning and managing Docker hosts

Andrew Dorokhov Andrew Dorokhov schedule 1 min read
menu_book Table of Contents

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
code

Need Help with Development?

Happy to help — reach out via the contacts or go straight to my Upwork profile.

work View Upwork Profile arrow_forward
Next Article

Docker logs: docker logs, drivers, and events

arrow_forward