Objective
Before using Docker, there was some misunderstanding about Docker-machine's understanding (previously thought docker-machine and Docker-engine were equivalent, Just a Docker-engine alias on the window or Mac platform, Khan ~ ~ ~); This is a good time to take advantage of this opportunity to get a better management.
Defined
Log in to the official website, search Docker-machine, the official website for its definition of the order is: a "local" or "cloud platform" to manage the Docker-engine tools . (from official website)
On Linux: We can use it to manage the remote Docker host
On Mac/window: We can use it to manage local Docker Engine/host
As mentioned above, Docker-machine is the tool that manages Docker-engine on the Docker-host (physical machine), so it has a set of CLI (command line interface) that belongs to it itself.
Let's take a look at how to use docker-machine locally.
Use Docker-machine on Win7
Because my laptop is "old", I can only run Docker on Win7 with Virtual box.
When our installation is complete, by default, Docker-machine will automatically create an engine named "Default".
Let's take a look at the current list of Docker-machine
$ docker-machine ls
As you can see, there is a defaut in our list, and now we are going to create a new Docker-engine (DEFAULT2):
Docker-machine Create--driver VirtualBox default2
When we're done, we can see that now we have two docker-machine, each running their own docker-engine .
Next, we'll check the DOCKER-ENGINE:DEFAULT2 environment.
$ docker-machine env DEFAULT2
Connect to Docker-engine (DEFAULT2) via Docker-machine
$ eval $ ("C:\Program files\docker toolbox\docker-machine.exe" env default2)
Next, let's use the Docker CLI to run a container and test
Run Echo Hello World
OK, everything is fine!! Finally attach the CLI list of Docker-machine
$ docker-machine Config <docker-machine name>$ docker-machine env <docker-machine name>$ docker-machine Inspect <docer-machine name>$ docker-machine IP <docker-machine name>$ docker-machine Kill < Docker-machine name>$ docker-machine Provision <docker-machine name>'start < Docker-machine name>$ docker-machine status <docker-machine name>$ docker-machine stop <docker-machine name >$ docker-machine upgrade <docker-machine name>$ docker-machine URL <docker-machine name>
Docker-docker Machine