Technical Anshu
Tutorials Blog
🐳 First Container

Docker Hello World Explained What the First Container Run Really Did

One short command, five separate things happening. Hello-world is not a toy - it is a full end-to-end test of the client, the engine, the image store, the network and the registry. This page decodes every line it prints so you know what a healthy Docker looks like.

✍️ Technical Anshu🪟 Windows 10 / 11⏱️ 6 minute read
🎥 Watch the full install in the video - WSL 2 setup and the first container, step by step

Every Docker tutorial starts with docker run hello-world, and most skip past what it proved. That is a shame, because when Docker breaks later, this output is your comparison point. Run it, read it properly once, and you will understand the difference between an image and a container better than most beginners - a topic this set also gives its own page.

Terminal - docker run hello-world, annotated by stage
Unable to find image 'hello-world:latest' locally (stage 2 - the local image store was checked, honestly empty) latest: Pulling from library/hello-world (stage 3 - the engine downloaded the image from Docker Hub) Hello from Docker! This message shows that your installation appears to be working correctly. (stage 4 and 5 - a container ran, printed this, and exited)
The famous output, decoded - nothing in it is an error, including the first line
1

Stage 1 and 2 - Client Talks to Engine, Engine Checks the Shelf

When you type the command, the docker client (the small program in your terminal) sends the request to the Docker engine running inside the WSL 2 environment. The engine first checks its local image store.

That is what Unable to find image 'hello-world:latest' locally means. Beginners read it as a failure; it is actually the engine honestly reporting an empty shelf and doing the right thing next. The latest part is the image's tag - its version label.

2

Stage 3 - The Pull from Docker Hub

Missing locally, the engine downloads the image from Docker Hub, the public registry, under the name library/hello-world. Images download in layers, and layers already on your machine are never downloaded twice - this is why your second container of the same base starts instantly.

  1. Run docker images now - hello-world sits in the store, a few kilobytes in size
  2. Run docker run hello-world again - no pull lines this time, it starts immediately from the local copy
3

Stage 4 and 5 - A Container Runs, Prints, and Exits

The engine creates a container from the image - a running instance with its own isolated filesystem and process space - and executes the one tiny program inside it. The program prints the welcome message and finishes, so the container exits.

That exit is normal. Run docker ps and you will see nothing running; run docker ps -a and the exited hello-world container is listed. Not everything in Docker stays running - a container lives exactly as long as its main process.

4

What This One Command Just Proved

  1. The client is installed and can reach the engine
  2. The engine is alive inside WSL 2
  3. Your machine can reach Docker Hub and pull images
  4. Containers can be created, run and stopped cleanly

If all four pass, your install is genuinely healthy. If the command fails, the failure line tells you which stage broke - no engine response means a startup problem (see the fix ladder page), a pull failure means a network or DNS problem, and that distinction saves real time.

🎥 Watch the Complete Process in the Video

Watch the video to see hello-world run live right after the install - and what the screen shows at each stage.

▶️ Watch Full Video
❓ Frequently Asked Questions

Is 'Unable to find image locally' an error?

No. It is the engine reporting that the image was not in the local store yet, immediately before downloading it. You will see it once per new image. If the pull that follows succeeds, everything is healthy.

Why does docker ps show nothing after hello-world?

Because the container already finished and exited - docker ps only lists running containers. Use docker ps -a to see exited ones. A container runs only while its main process runs, and hello-world's process just prints a message and ends.

Hello-world fails at the pull stage. What is wrong?

The engine is running but cannot reach Docker Hub - check your internet connection, any office proxy or firewall, and DNS. On restricted office networks the registry may be blocked by policy, which is an IT conversation, not a Docker fault.

This guide is based on the Technical Anshu Docker on WSL 2 video • Stuck on any step? Ask in the video comments — you will get a reply there 🙏