docker architecture part-2

Component 3: Docker Registry (The Warehouse) Simple Explanation The Docker Registry is a storage warehouse for Docker images. It's where pre-made recipes (images) are stored and shared.
Analogy: Imagine a central food warehouse where restaurants store their standardized ingredients. When a chef needs flour, they don't mill it themselves—they order from the warehouse. If you create a new recipe, you can also store it in the warehouse for others to use.
Types of Registries Type Example Use Case Public Registry Docker Hub Sharing open-source images, base images Private Registry AWS ECR, Google GCR, Azure ACR Company-internal images, proprietary code Self-Hosted Your own registry server Air-gapped environments, complete control
Component 4: Images (The Recipe Cards) Simple Explanation An image is a read-only template that contains everything needed to run an application. It's like a recipe card with step-by-step instructions.
Analogy: Think of an image as a recipe for chocolate chip cookies. The recipe lists:
Ingredients (base OS, dependencies)
Instructions (how to install, configure)
Cooking temperature (environment variables)
Serving size (how much memory/CPU)
Image vs Container Aspect Image - Container Analogy Recipe card - Cooked meal State Read-only - Read-write (running) Storage Stored on disk- Running in memory Lifecycle Permanent (until deleted)- Temporary (can be stopped/removed) Created by docker build -docker run
Component 5: Containers (The Meals) Simple Explanation A container is a running instance of an image. It's the actual meal that gets served.
Analogy: The recipe (image) for chocolate chip cookies is just instructions. When you actually bake the cookies, you get a container. You can bake multiple batches (containers) from the same recipe (image).
Component 6: Underlying Technology (Kitchen Infrastructure) This is what makes Docker work under the hood.
Linux Kernel Features Docker uses the Linux kernel's built-in features to create isolation:
Feature -Purpose -Simple Explanation Namespaces -Isolation -Gives each container its own view of the world (like giving each apartment its own address) Cgroups- Resource -limits Controls how much CPU/memory each container can use (like setting rent based on apartment size) UnionFS -Layered filesystem -Makes images efficient by sharing layers (like sharing a foundation between buildings)



