Install Docker and Verify Prerequisites

5 min
Audience
Beginner, Windows, macOS or Linux
Duration
20 to 30 min (plus Docker download)
Module
1/7
Learning Goal
Have a working Docker with enough memory, retrieve the lab kit, and read the prerequis output to fix what's missing before starting

Lab Kit to Downloadhttps://github.com/hrhouma2/aiopsatlas-recherche-graphes-labo-fr — with git clone https://github.com/hrhouma2/aiopsatlas-recherche-graphes-labo-fr or the green Code → Download ZIP button. This lesson installs Docker (steps 1 to 3), then retrieves this kit (step 4) and runs its checklist (step 5).

In One Picture

Before takeoff, a pilot doesn't guess: they run a checklist, point by point, and only take off when everything is green. The lab does the same. Docker is the runway (without it, nothing runs), allocated memory is the fuel (Elasticsearch, Kibana, and Neo4j are three Java machines that each demand their share), and ports 9200, 5601, 7474, and 7687 are the radio frequencies that must be free. The prerequis command is your checklist: it prints a green checkmark or red cross for each point and tells you exactly what to fix. You only run demarrer once the last line shows green.

How It Works

The lab is five containers described in a docker-compose.yml file and an accompanying script in two flavors: labo.sh (bash: Linux, macOS, WSL2, Git Bash) and labo.ps1 (PowerShell 5.1 or 7 on Windows). The script does nothing magical: it chains docker compose commands and docker compose exec … curl inside containers. Result: you install nothing else on your machine but Docker, no Java, no Node, no curl.

What prerequis checks, in order: docker command exists; daemon responds (docker info); docker compose v2 is there; memory visible by Docker (docker info --format '{{.MemTotal}}') reaches 4 GB (cross below, yellow warning between 4 and 6, green from 6); at least 2 processors; all four ports are free or already used by the lab itself.

SystemWhat You InstallMemory SettingParticularity
Windows 10/11Docker Desktop, WSL 2 engineFile %UserProfile%\.wslconfigSet-ExecutionPolicy if PowerShell refuses the script
macOSDocker Desktop (Intel or Apple Silicon)Settings → Resources → MemoryNothing else
LinuxDocker Engine + docker-compose-pluginMachine's RAM, directlydocker group and vm.max_map_count required

Step by Step

  1. Windows: Install Docker Desktop with WSL 2. Download Docker Desktop, leave checked "Use WSL 2 instead of Hyper-V", restart if requested, then launch Docker Desktop and wait for the whale icon to be stable (green). Under WSL 2, Docker doesn't see all your RAM: by default half, rarely more than 8 GB. To guarantee it 6 GB, create file C:\Users\<you>\.wslconfig (PowerShell):

    powershell
    notepad $env:UserProfile\.wslconfig

    Paste these three lines, save, then restart the WSL virtual machine:

    ini
    [wsl2]
    memory=6GB
    processors=4
    powershell
    wsl --shutdown

    Then relaunch Docker Desktop. What to see: docker info --format '{{.MemTotal}}' returns a number greater than 6,000,000,000. Good news: Docker Desktop's WSL 2 machine already fixes vm.max_map_count to 262144, you don't have to do anything there (verified: docker run --rm alpine sysctl vm.max_map_countvm.max_map_count = 262144).

  2. macOS: Install Docker Desktop and Increase Memory. Install the .dmg matching your chip (Apple Silicon or Intel), launch Docker Desktop, then open Settings → Resources → Advanced and push the Memory slider to 6 GB minimum (8 GB if you plan to enable OpenSearch). Click "Apply & restart". What to see: docker info --format '{{.MemTotal}}' reflects the new setting.

  3. Linux: Docker Engine, docker group, and vm.max_map_count. Install Docker Engine and Compose plugin per your distribution's docs (packages docker-ce, docker-ce-cli, containerd.io, docker-compose-plugin). Then, to avoid typing sudo every time:

    bash
    sudo usermod -aG docker $USER
    newgrp docker        # or logout and login again
    docker run --rm hello-world

    Required on Linux: Elasticsearch and OpenSearch refuse to start if the kernel limits virtual memory zones to 65,530 (the default). Raise the limit now and make it permanent:

    bash
    sudo sysctl -w vm.max_map_count=262144
    echo 'vm.max_map_count=262144' | sudo tee -a /etc/sysctl.conf
    sysctl vm.max_map_count

    What to see: vm.max_map_count = 262144. Without this setting, demarrer fails with the message described in lesson 04 (failure #3).

  4. Get the Lab Kit. Two equivalent options. With Git:

    bash
    git clone https://github.com/hrhouma2/aiopsatlas-recherche-graphes-labo-fr
    cd aiopsatlas-recherche-graphes-labo-fr
    ls

    Or download the ZIP, unzip it, and navigate into the folder. You'll see:

    text
    docker-compose.yml
    labo.ps1 (Windows)
    labo.sh (bash)
    elasticsearch/
    kibana/
    neo4j/
  5. Run the Checklist. From inside the folder, one command:

    powershell
    .\labo.ps1 prerequis

    Or on Linux/macOS:

    bash
    ./labo.sh prerequis

    This prints one status per line. All green? Proceed to lesson 03. One or more crosses? See the troubleshooting section below.

If Something Goes Wrong

  • "Cannot find docker command" — Docker isn't installed or not in PATH. Reinstall, or make sure Docker Desktop is running.
  • "memory should be at least 4 GB" — Increase Docker's memory (see steps 1-2 above).
  • "vm.max_map_count is too low" — Linux only; run sudo sysctl -w vm.max_map_count=262144 (see step 3).
  • "Ports 9200/5601/7474/7687 in use" — Kill the processes using them or change the ports in docker-compose.yml.
  • "PowerShell script execution disabled" — Run Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser first, then retry.

Key Takeaways

  • Docker Desktop (Windows/macOS) or Docker Engine (Linux) is the only tool you install.
  • Memory matters: 4 GB works, 6 GB is comfortable, 8 GB if you want OpenSearch too.
  • vm.max_map_count = 262144 is non-negotiable on Linux.
  • Once labo prerequis shows all green, you're ready for lesson 03.

Going Further