Table of Contents

What is Docker?

image.png

Docker is an open-source project that automates the deployment of applications inside software containers, providing an additional layer of abstraction and automation for application virtualization across multiple operating systems.

What is a Docker Container?

image.png

A Docker container is a running version of a Docker image, designed as a lightweight and self-contained environment that includes an application along with everything it needs to run, such as dependencies, libraries, and configuration files.

For example, imagine you want to take home-cooked food anywhere without worrying about how it will be prepared.

The lunch box contains everything needed to consume the meal. It doesn’t matter if you’re at home, at the office, or at a friend’s place — you open it and the food is exactly the same every time. In the same way a lunch box preserves food consistently regardless of location, a Docker image packages an application with all its dependencies, and a Docker container runs that image reliably on any operating system, ensuring reproducibility across different environments.

<aside> ❗

Docker installation varies depending on the operating system. In this blog, we will use Docker on Windows via WSL.

For other operating systems, please refer to the official installation instructions below.

The Recipe (Dockerfile)

Before to introduce the Dockerfile concept, we’ll learn to use some Docker commands: