Before diving into commands, it’s important to understand how Docker works internally.
Docker follows a client-server architecture consisting of three main components:
docker build, docker run).[ 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.
FROM – Define Base ImageFROM statement.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.