Docker comes with great documentation. Sometimes though, with different components and tools, it gets less easy to make sense out of everything. I’ve tried to put together the most important parts.
- Docker
- Docker Engine
- Docker Client
- Docker Image
- Docker Container
- Docker Registries and Docker Hub
- Docker Machine
- Docker Engine Swarm mode
- Docker Compose
- Is a platform to develop and run applications.
- Applications are packaged and run in isolated environment called container.
- As containers are isolated, it allows to run many containers simultaneously on the same host.
- Is a client-server application. Usually when people talk about Docker, they refer to Docker Engine implicitly.
- Runs exclusively on Linux.
- Consists of the three major components - Docker Daemon, Docker CLI and Docker REST API.
- Docker Daemon is a process which runs on a host machine.
- REST API is an interface between daemon and client.
- Docker CLI (command line interface) is a client which uses REST API to talk to the daemon process.
- Communicates with Docker Engine.
- Uses either Docker CLI or Kitematic graphical interface to manage containers.
- Is a read-only template with set of instructions for creating a container.
- Application is built and packaged through images.
- Can be based on one or more other images.
- The instructions are described in a file called Dockerfile, with predefined syntax.
- Images can be distributed and reused via Docker Registry or Docker Hub
- Is a runnable instance of Docker Image.
- Is an environment where we can run our application.
- Containers can be managed via Docker Client, CLI or API directly.
- Each container is isolated and secure.
- Docker Registry is a storage for images.
- It can be public or private, be on the same machine as docker daemon or client, or in completely different server.
- Docker Hub is a registry of official Docker Images.
- Is a tool which can be used to install Docker Engine on virtual host (e.g. on Mac or Windows).
- Before Docker v1.12, the only way to run Docker Engine on Mac or Windows was to use docker machine (Now there are native apps, see Docker for Mac and Docker for Windows).
- Enables to provision multiple remote Docker hosts by automatically installing Docker Engine on them. Those Dockerized hosts sometimes are referred as managed machines.
- A swarm is a cluster of Docker Engines (nodes) where you deploy services.
- When you run Docker in swarm mode, you orchestrate services.
- Services are just tasks which are executed in nodes.
- Node is an instance of Docker Engine participating in swarm.
- Swarm mode is useful for cluster management, load balancing, service discovery, scaling and more.
- Is a tool for running multiple containers in Docker application.
docker-compose.yml
file is used to configure application services.- Supports communication between isolated containers.