Docker Architecture & Essential Commands

🧱 Docker Architecture Overview

Before diving into commands, it’s important to understand how Docker works internally.

Docker follows a client-server architecture consisting of three main components:

  1. Docker Client:
  2. Docker Daemon (dockerd):
  3. Docker Registry:
[ Developer (CLI) ] --> [ Docker Daemon ] --> [ Container Runtime / Registry ]

Each container runs as an isolated process on your system, sharing the OS kernel but having its own filesystem, network, and process space.


⚙️ Key Dockerfile Commands

1. FROM – Define Base Image

Example:

FROM python:3.10

Explanation:

This means our container will start from an official Python 3.10 image that already includes Python installed.

Real-life example:

If you're building a Django web app, using FROM python:3.10 saves you from manually installing Python inside the container.