(12) Docker Machine Introduction

Source: Internet
Author: User
Tags docker for mac docker ps docker compose docker run docker toolbox docker machine

Official Document: https://docs.docker.com/machine/overview/

What can I do with Docker machine?

    • Install and run Docker on Mac or Windows
    • Configure and manage multiple remote Docker hosts
    • Provide swarm clusters
What is Docker machine?

Docker Machine is a tool that allows you to install Docker engine on a virtual host and manage the host with the Docker-machine command. You can use a computer to create a Docker host on a local Mac or on a Windows computer, a corporate network, a data center, or a cloud provider such as Azure,aws or digital Ocean.

With the Docker-machine command, you can start, check, stop and restart the managed host, upgrade the Docker client and daemon, and configure the Docker client to communicate with the host.

Point the machine CLI to a running managed host, and you can run commands directly on that host docker . For example, run to docker-machine env default a default host named, follow the onscreen instructions to complete the env settings, then run docker ps , and so on docker run hello-world .

Machine is the only way to run Docker on a Mac or Windows before Docker v1.12. Starting with Beta and Docker v1.12, Docker for Mac and Docker for Windows are available as on-premises applications and are a better choice for updating desktops and laptops. We encourage you to try these new apps. The Docker for Mac and Docker for Windows installers include Docker machine and Docker Compose.

If you're not sure where to start, see Getting Started with Docker, which will guide you through a brief end-to-end tutorial on Docker.

Why use Docker machine?

Docker machine allows you to configure multiple remote Docker hosts on various types of Linux.

In addition, machine allows you to run Docker on an older Mac or Windows system, as described in the previous topic.

Docker Machine has these two broad use cases.

    • You have an older desktop system and want to run Docker on Mac or Windows

If your primary work does not meet the older Mac or Windows laptops or desktops that are required by the new Docker for Mac and Docker for Windows applications, then you need to run Docker engine on your local Docker machine. Installing Docker machine on your Mac or Windows with the Docker Toolbox installer configures the Docker engine for your on-premises virtual machines so you can connect to it and run docker commands.

    • I want to configure a Docker host on a remote system

Docker engine runs locally on a Linux system. If you have a Linux system as your main system and want to run docker commands, you only need to download and install the Docker Engine. However, if you want to configure multiple Docker hosts in the cloud or even locally on the network, you need an efficient way to do so, you need Docker machine.

Whether the primary system is mac,windows or Linux, you can install Docker machine on it and use the Docker-machine command to configure and manage a large number of Docker hosts. It automatically creates the host, installs the Docker Engine on it, and then configures the Docker client. Each managed host ("Machine") is a combination of Docker hosts and configured clients.

What is the difference between Docker engine and Docker machine?

When people say "docker," they usually refer to Docker Engine, a client-server application composed of Docker daemons, a rest API that specifies the interface that interacts with the daemon, and a command-line interface (CLI) to talk to the daemon (via rest API wrapper). Docker engine accepts Docker commands from the CLI, such docker run <image> as docker ps listing running containers, docker image ls listing mirrors, and so on.

Docker Machine is a tool for configuring and managing a Docker host (the host on the Docker engine). Typically, you install Docker machine on your local system. Docker machine has its own command-line client Docker-machine and Docker engine client Docker. You can use machine to install Docker Engine on one or more virtual systems. These virtual systems can be local (for example, when you use a computer to install and run the Docker engine on a Mac or VirtualBox on Windows) or remotely (such as when you use a computer to configure a Docker host on a cloud provider). The Docker host itself can be considered a "machine" that is sometimes referred to as management.

(12) Docker Machine Introduction

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.