1.4: First contact: The hello-world

Now thatDocker is installed and up and running on your machine, it's time to launch your first container.

Docker offers a special image to quickly test that everything is working: hello-world.

What ishello-world ?

hello-world is a very lightweight image that does exactly what its name suggests:

  • It downloads automatically fromDocker Hub
  • It runs in a container
  • It displays a welcome message in the terminal

It’s an easy way to verify that your installation is working perfectly before moving on to more complex applications.

Launch the container

From your terminal (or PowerShell on Windows), type the following command:

docker run hello-world

What happens behind the scenes:

  1. Docker It searches for the imagehello-worldon your machine.
  2. If it’s not present,Docker downloads it fromDocker Hub.
  3. Docker creates a container from this image and runs it.
  4. The container displays a message confirming thatDocker it is working correctly.

The message looks like this:

Hello from Docker!
This message shows that your installation appears to be working correctly.

DockerIf you see this message, congratulations! You’ve just launched your first container.

Why is this important?

  • It confirms thatDocker can download images and launch containers on your machine.
  • This is the starting point before creating your own containers or working with real applications.
  • You can immediately see the power ofDocker: an isolated and reproducible environment, ready in seconds.

💡 Tip:

You can run this command as many times as you like. Each run creates a temporary container, which is automatically deleted after the message is displayed. It’s a simple and risk-free way to get familiar with Docker.