DCubes
Docker module

Getting started

Your Docker practice environment

Install Docker and Compose on Windows, macOS, or Linux. This site never runs containers — you will.

beginner45 minRun on your machine

What you will be able to do

  • Install Docker Desktop or Docker Engine so docker and docker compose work in your terminal
  • Run a hello-world container and read the output
  • Create the ~/dcubes/docker-lab folder used in every later lesson

Why this exists

Data tools arrive as containers: Postgres, Spark, Airflow, a notebook image. A website that started containers for you would not teach the skill. You type. Your machine runs Docker.

Do Linux Getting Started first if you do not yet have a prompt and ~/dcubes. This page adds Docker next to that prompt.

Pick your operating system

Open the section that matches how you practiced Linux.

Windows — Docker Desktop with WSL

You already have Ubuntu in WSL from the Linux module. Docker Desktop talks to that Ubuntu so docker works inside the Ubuntu terminal — the same window you used for Linux.

1. Install Docker Desktop

  1. Open the official install page: Install Docker Desktop on Windows.
  2. Download Docker Desktop for Windows from that page (not a random mirror).
  3. Run the installer. Keep Use WSL 2 instead of Hyper-V checked if you see it.
  4. Restart if Windows asks.

2. Turn on WSL integration

  1. Start Docker Desktop from the Start menu. Wait until it says it is running.
  2. Open Settings (gear) → ResourcesWSL integration.
  3. Enable integration for Ubuntu (the distro you used in Linux). Apply and restart Desktop if asked.

3. Check from Ubuntu, not from PowerShell

Open the Ubuntu app (or Windows Terminal → Ubuntu). You should still have a Linux prompt.

docker version
docker compose version

What you should see: a Client section and an Engine / Server section. docker compose version should print a v2 version (for example Docker Compose version v2.x).

If docker is command not found, Desktop is not running or WSL integration is off. Start Desktop, wait, try again.

4. How to come back tomorrow

Start Docker Desktop, then open Ubuntu. You do not reinstall.

macOS — Docker Desktop
  1. Open Install Docker Desktop on Mac.
  2. Download the installer that matches your chip: Apple silicon (M1/M2/M3/M4) or Intel.
  3. Drag Docker to Applications and open it. Grant the permissions macOS asks for.
  4. Wait until the whale icon is steady.

In Terminal:

docker version
docker compose version

What you should see: Client and Engine sections, and a Compose v2 version line.

If Cannot connect to the Docker daemon, Docker Desktop is not running. Open it from Applications.

Linux desktop — Docker Engine from apt

This is for Ubuntu or Debian as your actual desktop (not WSL). We use the distro packages so you do not run the curl | sh convenience script.

sudo apt update
sudo apt install --yes docker.io docker-compose-v2
sudo usermod -aG docker "$USER"

Log out of the desktop session and log back in (or reboot) so the docker group applies.

docker version
docker compose version

If the engine is not running:

sudo service docker start

On Fedora, the same idea is sudo dnf install docker docker-compose plus the group change. Commands in later lessons are the same.

VirtualBox Ubuntu VM

If you used the VirtualBox Ubuntu fallback, install Engine inside the VM, same as Linux desktop above. Nested Docker Desktop is not the path.

Give the VM at least 4 GB of RAM if you can. Images take disk under /var/lib/docker.

Ready checklist

From the same terminal you used for Linux, run these one at a time. Names and version numbers will not match the examples. That is success.

docker version

You need both Client and a Server / Engine. Client-only means the app is not running.

docker compose version

You want Compose v2 (docker compose, a space). The old hyphen form docker-compose is not what this module uses.

Pull and run the smallest image Docker publishes:

docker run --rm hello-world

The first time, Docker downloads a few kilobytes. Then it prints a hello from a container.

What you should see: a paragraph that starts with Hello from Docker! and explains that the client talked to the engine, pulled an image, and ran a container.

--rm deletes the container when it exits so it does not pile up. We will use it a lot.

Create the practice folder

Every later lesson uses this directory.

mkdir -p ~/dcubes/docker-lab
cd ~/dcubes/docker-lab
pwd

pwd should end in dcubes/docker-lab. Leave this folder as the place you cd at the start of each lesson.

If something failed

Cannot connect to the Docker daemon. On Windows/macOS, start Docker Desktop and wait. On Linux, sudo service docker start. WSL: confirm Ubuntu is enabled under WSL integration.

permission denied while talking to the Docker socket (Linux). You are not in the docker group yet, or you did not log out after usermod. Until then, sudo docker works but we will not make that the habit.

docker compose: command not found. You have the engine but not the Compose plugin. On Ubuntu: sudo apt install --yes docker-compose-v2. Docker Desktop includes Compose.

hello-world hangs on pull. You need outbound HTTPS to Docker Hub. Work networks sometimes block it. Try again on a normal connection.

WSL docker works in PowerShell but not Ubuntu. Turn on WSL integration for that distro in Docker Desktop settings.

I closed everything. Start Docker Desktop (or the engine), open the terminal, cd ~/dcubes/docker-lab.

What is next

Lesson 1 is conceptual: why data work uses containers. From lesson 2 onward, keep Docker running and this folder open.