📥 Images
Images: Docker commands follow a strict 'docker [object] [action]' pattern — like a library system where you search for books (images), borrow them (pull), read them (run), and r
Docker commands follow a strict 'docker [object] [action]' pattern — like a library system where you search for books (images), borrow them (pull), read them (run), and return them when done (stop/rm). So why not give every command its own unique name instead of memorizing flags? Because a consistent object+verb structure scales to dozens of resource types (image, container, volume, network) without forcing a new mental model each time — the same way Java's Collections framework or Stream API (filter/map/collect) lets you reuse one pattern across every collection type. In a CI script, this consistency means you can write one generic cleanup function that calls 'docker [object] prune' across images, containers, and volumes alike, instead of bespoke logic per resource.
Pulling and searching images
What Does docker pull Actually Download Behind the Scenes?
docker pull does NOT download the image…
`docker pull python:3.12-slim` does NOT download the image as ONE file — an image is made of STACKED LAYERS, and each layer is pulled SEPARATELY.
Layers already present locally are…
Layers already present locally (e.g. base layers SHARED with a previously pulled `python:3.11`) are NOT re-downloaded — only the MISSING layers are fetched.
docker search QUERIES Docker Hub…
`docker search selenium` does NOT download anything — it QUERIES Docker Hub's registry API and LISTS matching public image names; the decision to pull is still yours.
Try it in the Docker Sandbox in the "🔄 Lifecycle & Debug" tab: type docker pull nginx and watch the IMAGES shelf update live.
Listing, inspecting and removing images
🎬 Trying to Delete an Image: "Image Is Being Used"
`docker pull python:3.12-slim` — a read-only template descends layer by layer from Docker Hub and gets cached on local disk.
A container is started from this image and stays running — `docker ps` lists it.