Docker-docker Machine

Source: Internet
Author: User
Tags docker toolbox docker machine

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.