Docker

A wonderful and amazing technology that drivers application development and deployment to the next level.

Docker
Photo by Ian Taylor / Unsplash

Docker is an open-source platform for building, deploying, and managing containerized applications.

In brief, A Docker container is a packaging format that packages all the code and dependencies of an application in a standard format that allows it to run quickly and reliably across computing environments. A Docker container is a popular lightweight, standalone, executable container that includes everything needed to run an application, including libraries, system tools, code, and runtime. Docker is also a software platform allowing developers to quickly build, test, and deploy containerized applications.

Docker terminology

Docker Engine: The system layer that lets you create and run Docker containers.

Container image: A package with all the dependencies and information needed to create a container. An image includes all the dependencies (such as frameworks) plus deployment and execution configuration to be used by a container runtime. Usually, an image derives from multiple base images that are layers stacked on top of each other to form the container's filesystem. An image is immutable once it has been created.

Dockerfile: A text file that contains instructions for building a Docker image. It's like a batch script, the first line states the base image, to begin with, and then follow the instructions to install required programs, copy files, and so on, until you get the working environment you need.

Build: The action of building a container image based on the information and context provided by its Dockerfile, plus additional files in the folder where the image is built.

Container: An run instance of a Docker image. A container represents the execution of a single application, process, or service.

Compose: A command-line tool and YAML file format with metadata for defining and running multi-container applications. After you've created the definitions, you can deploy the whole multi-container application with a single command (docker-compose up) that creates a container per image on the Docker host.

Container and Virtual Machine

Docker Container vs Virtual Machine

The diagram above shows the difference between A Container and a Virtual Machine in terms of layers. The Container shares the host kernel resources reducing the overhead and improving performance, whereas the VM contains the whole OS separately from the host; thus, Containers are more portable and efficient than Virtual Machine.

Sources:
www.docker.com
www.oracle.com
learn.microsoft.com/docker-introduction
learn.microsoft.com/containers-vs-vm