Skip to content
Search lessons, topics, tests…
Esc

    ↑ ↓ moveEnter openEsc close

    Guided course · Testing and Production Engineering

    Docker from Zero to Practical .NET 10: back to the course

    Module 1 · Images, Containers and WSL · Lesson 2 of 30

    Images vs containers, and how Docker works

    Image is not container

    You can have one image and create ten containers from it. Each container gets its own writable layer and runtime state. Deleting one container does not delete the image. Updating an image does not magically mutate already-created containers; normally you recreate them from the new image.

    Registry is not Docker Engine

    The engine runs containers. A registry stores images. Docker Hub, GitHub Container Registry (GHCR), and Azure Container Registry (ACR) are registries.

    4. How Docker actually works

    At a high level, the Docker CLI talks to a Docker daemon/engine. The engine manages images, networks, volumes, and container processes. Modern Docker uses lower-level components such as containerd and OCI runtimes under the hood. You usually do not need to manage those components directly for application development.

    Text
    You type: docker run nginx
     |
     v
    Docker CLI -> Docker Engine / daemon
     |
     +-----------+-----------+
     | | |
     Images Containers Volumes/Networks
     |
     Registry (pull/push)

    Important: The Docker CLI is only a client. If the engine is not running, commands such as docker ps fail even though the docker executable exists.

    5. Docker Desktop on Windows

    Recommended setup: WSL 2 backend

    Docker Desktop currently recommends the per-user installation for most Windows developers and uses WSL 2 by default for Linux containers. Docker documents WSL 2 as covering the needs of the vast majority of desktop users.

    Source: Docker Desktop Windows install: https://docs.docker.com/desktop/setup/install/windows-install/

    Step-by-step

    1. Open PowerShell as Administrator once and verify/install WSL.
    2. Install Docker Desktop for Windows.
    3. Start Docker Desktop.
    4. Use the WSL 2 based engine (normally the default).
    5. Enable integration for your Ubuntu WSL distribution if you want to run docker commands inside Ubuntu.
    6. Run docker version and docker run hello-world.
    Sign in to mark lessons done and keep your place in the course.Sign in