What’s the difference between Docker Engine and Docker Machine?
When people say “Docker” they typically mean Docker Engine, the client-server application made up of the Docker daemon, a REST API that specifies interfaces for interacting with the daemon, and a command line interface (CLI) client that talks to the daemon (through the REST API wrapper). Docker Engine accepts
docker commands from the CLI, such as
docker run <image>,
docker ps to list running containers,
docker image ls to list images, and so on.
Docker Machine is a tool for provisioning and managing your Dockerized hosts (hosts with Docker Engine on them). Typically, you install Docker Machine on your local system. Docker Machine has its own command line client
docker-machine and the Docker Engine client,
docker. You can use Machine to install Docker Engine on one or more virtual systems. These virtual systems can be local (as when you use Machine to install and run Docker Engine in VirtualBox on Mac or Windows) or remote (as when you use Machine to provision Dockerized hosts on cloud providers). The Dockerized hosts themselves can be thought of, and are sometimes referred to as, managed “*machines*”.
If you are using Docker Machine, you can get the manager IP with either
docker-machine ls or
docker-machine ip <MACHINE-NAME> — for example,
docker-machine ip manager1.
The tutorial uses
How to Connect to Docker Daemon
Add a host without a driver
You can register an already existing docker host by passing the daemon url. With that, you can have the same workflow as on a host provisioned by docker-machine.
# via TCP $ docker-machine create --driver none --url=tcp://192.168.18.168:2376 default3 # via SSH $ docker-machine create --driver none --url=ssh://192.168.18.10:31565 default4
Refer to https://swsmile.info/post/docker-daemon/ for how to config Docker Daemon