Docker machine allows us to easily deploy an environment from a local machine in any infrastructure service, like AWS, DigitalOcean, Google Cloud, etc, through the installation of the driver that you want, environment variables, etc.
With that, we can create a host Docker in any of these platforms, and easily manage those machines from our local machine.
docker-machine create --driver virtualbox first-host-box
This command, creates a new host docker, with the driver VirtualBox and with the name "first-host-box".
Lists all the available hosts in your machine.
Lists the environment variables that need to be set.
We can easily declare it with:
eval $(docker-machine env first-host-box)
docker-machine ip first-host-box
Lists the ip of the host docker.
docker-machine ssh first-host-box
With this command, we can access via SSH this host docker and use Linux commands inside it.
docker-machine inspect first-host-box
Shows details of the host docker.
docker-machine stop first-host-box
Stops the host.
docker-machine start first-host-box
Starts the host.
docker-machine rm first-host-box
Removes the host.
With this, the Docker machine promotes great ease of installation and deployment in a cloud environment from its local containers.