An Enthusiastic Programmer

Getting Started

|

Docker is a container technique, which has much lower overhead than VM. Docker contains a lot of advantages lightweight, convenience, quickness, and portable.

Docker Inc lunched the docker project during 2011. Docker debuted to the public in 2013, release it as an open-source project in May in the same year. In release 0.9, Docker writes its components by go language, instead of using the previous LXC.

Docker can package your application and dependency into a container, which is an isolated environment from others. Containers are lightweight and didn’t require an extra load of a hypervisor. You can launch multiple apps simultaneously in a container (Don’t recommend to run multiple apps in a single docker container, run them each in separate containers instead).

Containers are running on top of Docker Engine, which is a client-server infrastructure application that mainly involves CLI, Rest API, and Docker daemon.

  • Docker daemon: A server-side technology, which is a type of a long-running program, manages underlying data, such as containers, apps, volumes, networks.

  • Rest API: A set of interfaces, which defined between client-side and server-side, as a communication purpose.

  • CLI(aka. Command Line Interface): A client-side technology, which used to interact with users in a command-line window. CLI transfer commendations that users inputted into a Rest API format then send those APIs to the server(Docker daemon).

AltDocker Engine, come from docker.com

Docker CLI doesn’t manage containers and other underlying resources directly. Docker CLI is only available to send REST APIs to the server. Those APIs instructs Docker Daemon to manage the underlying sources on the server-side. In most of the cases, Docker Deamon and CLI installed in the same host. You can install Docker Deamon in a remote server, install CLI in local clients, configure clients related to the target docker daemon server.

AltMultiple CLI clients related to one Daemon server

Docker Image is a read-only template with instructions for creating a docker container. Docker container is a runnable instance of a docker Image. On the other hand, a Docker Image can exist without docker containers, whereas, a docker container depends on docker images and use them to build up a run-time environment. So their relationship is that a docker container is an instance of a docker image.

Docker registry store docker images. Docker Hub is a public registry that anyone can use, and Docker Engine looks for docker images on Docker Hub by default. You can even configure to run your own registry.

AltDocker architecture, come from docker.com