4. Docker Engine
When people say "Docker" they typically mean Docker Engine,
the client-server application made up of the Docker daemon, a
REST API that speci es 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
dockerrun<image>, dockerpsto list running
containers, dockerimagesto list images, and so on.
Engine is the core of Docker and nothing else will run without it.
Ref: docker.com
4 / 31
6. Docker daemon
The Docker daemon runs on a host machine. The user does not
directly interact with the daemon, but instead through the
Docker client.
Docker client
The Docker client, in the form of the docker binary, is the
primary user interface to Docker.
It accepts commands from the user and communicates back and
forth with a Docker daemon.
Ref: docker.com
6 / 31
Docker Architecture
Docker uses a client-server architecture. The Docker client talks
to the Docker daemon, which does the heavy lifting of building,
running, and distributing your Docker containers.
Both the Docker client and the daemon can run on the same
system, or you can connect a Docker client to a remote Docker
daemon.
The Docker client and daemon communicate via sockets or
through a RESTful API.
9. 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-machineand 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".
Using docker-machinecommands, you can start, inspect, stop, and restart a managed
host, upgrade the Docker client and daemon, and con gure a Docker client to talk to your
host.
Point the Machine CLI at a running, managed host, and you can run docker commands
directly on that host. For example, run docker-machineenvdefaultto point to a
host called default, follow on-screen instructions to complete env setup, and run
dockerps, dockerrunhello-world, and so forth.
9 / 31
Docker Machine vs.
Docker Engine
Ref: Machine Overview
10. Docker Machine
10 / 31
Install and run Docker
on Mac or Windows
Provision and manage
multiple remote
Docker hosts
Provision Swarm
clusters
19. Docker Swarm is native clustering for Docker.
It turns a pool of Docker hosts into a single,
virtual Docker host.
Because Docker Swarm serves the standard
Docker API, any tool that already
communicates with a Docker daemon can use
Swarm to transparently scale to multiple
hosts.
19 / 31
Docker Swarm
Ref: Mike Goelzer, Swarm: Docker Native Clustering, Swarm
Overview
25. In this case, we are using the discovery
backend hosted on Docker Hub to create a
unique discovery token for the cluster. This
discovery backend is only for low-volume
development and testing purposes.
The discovery backend maintains an up-to-
date list of cluster members and shares that
list with the Swarm manager. The Swarm
manager uses this list to assign tasks to the
nodes.
25 / 31
Swarm Discovery Token
30. Refs
1. Machine Overview
2. Get started with a local VM
3. Swarm Overview
4. Evaluate Swarm in a sandbox
5. Mike Goelzer, Swarm: Docker Native Clustering
6. Docker Machine - Reference env
30 / 31