Back to course

Lesson 2: Setting Up Your Docker Environment

Docker Zero to Hero: The Complete Containerization Course for Beginners

Lesson 2: Setting Up Your Docker Environment

Before we start building, we need to install Docker Desktop, which bundles all the necessary tools for development on Windows, macOS, and Linux.

Docker Desktop Installation

Docker Desktop includes the Docker engine (daemon), the Docker CLI (client), Docker Compose, and Kubernetes (optional).

  1. Download: Go to the official Docker website and download the installer for your operating system.
  2. Installation: Follow the platform-specific instructions.
    • (Note for Windows users: You may need to enable WSL 2 and/or Hyper-V.)
  3. Launch: Start Docker Desktop. You should see the Docker whale icon in your system tray.

Verifying the Installation

Open your terminal (Command Prompt, PowerShell, or Bash) and run the following command to check the Docker version:

bash docker --version

You should see output similar to:

Docker version 24.0.5, build 337b51b

Next, verify that the Docker daemon (engine) is running by executing a basic command:

bash docker run hello-world

Expected Output

If the installation was successful, Docker will:

  1. Search for the hello-world image locally.
  2. Not find it, so it will pull it from Docker Hub (the default registry).
  3. Create a container from that image.
  4. Run the application inside the container, printing a message that confirms your installation is working.

This simple command confirms that both the Docker client (CLI) and the Docker daemon (engine) are communicating correctly.