Free lesson · Module 1, lesson 7 of 8

Setting up: Docker and the lab on an 8 GB laptop

Install Docker (Ubuntu, Windows 11 with WSL2, or macOS), cap its memory so an 8 GB laptop stays usable, unpack the lab, and run the setup check until every line says OK.

Lessons in this module

Lesson notes

For the student

Everything in this lab runs in Linux. Set up one Linux, give Docker 4 GB of your 8, put the lab in your Linux home with 15 GB of free disk, and run the setup check until seven lines say OK. Every step for Windows 11, Ubuntu and macOS is in labs/m01/README.md. Docker Engine is free, and Docker Desktop is free for personal and education use; nothing in this course costs money.

One Linux, Docker at 4 GB

  • Windows 11: Ubuntu 26.04 inside WSL2; %UserProfile%\.wslconfig holds [wsl2] and memory=4GB; then wsl --shutdown. Docker Engine inside Ubuntu, or Docker Desktop for Windows with its WSL2 integration on for Ubuntu-26.04
  • Ubuntu laptop: Ubuntu 26.04 (24.04 also works); Docker runs directly, with no cap of its own; every container of the lab has its own memory limit (1,504 MiB in all for the lab of lesson 1.8)
  • macOS: Docker Desktop, Settings, Resources, Memory 4 GB; brew install jq; curl and make come with xcode-select --install
  • The memory line reads the laptop, then Docker's share: OK memory 16.0 GB, Docker 7.7 GB is a 16 GB Mac giving Docker about 8 GB. On an 8 GB laptop give Docker 4 GB; under 3,500 MiB the line fails

The Windows 11 route

  • PowerShell: wsl --list --online, then wsl --install -d Ubuntu-26.04, then make your Linux user
  • In Ubuntu: sudo apt update && sudo apt install -y curl jq make unzip ca-certificates
  • Docker Engine and Compose from Docker's own package repository (the commands in the lab README), then sudo usermod -aG docker "$USER" and a new terminal (on WSL2, wsl --shutdown if needed)
  • unzip cybersecurity-foundations.zip -d ~ && cd ~/cybersecurity-foundations: the lab lives in ~/cybersecurity-foundations, never under /mnt/c (no Linux permissions, slow files), /tmp (can be emptied at restart) or /root (needs sudo)

The setup check

  • ./scripts/check_setup.sh prints seven lines: OK linux, OK memory, OK docker, OK compose, OK disk, OK curl, OK jq, each with a short detail
  • Each FAIL line names its own fix; run the check again after every fix; it exits 1 while any line fails
  • FAIL disk: 7 GB free in /System/Volumes/Data, the lab needs 15 GB (delete or move files, then run this again): the images and data take about 7 GB, and make pull downloads about 3 GB; docker system df shows what Docker's images, containers and volumes hold
  • FAIL docker: permission denied on /var/run/docker.sock means you are not in the docker group yet: sudo usermod -aG docker $USER, then a new terminal. Never sudo chmod 777 on the socket, and do not put sudo before every docker command
  • On a laptop under 8 GB the memory line adds just enough: close other apps while the lab runs

Try it

  • Do the setup for your laptop from labs/m01/README.md
  • Run ./scripts/check_setup.sh in ~/cybersecurity-foundations until it prints OK linux, OK memory, OK docker, OK compose, OK disk, OK curl, OK jq
  • You should see seven OK lines

Every technique in this course is practised only on the lab machines the course gives you, running on your own laptop.

Lesson quiz

Checked in your browser. Nothing is sent or saved.

5 questions

Question 1 · easy

On WSL2, where should the lab folder live, as seen from Ubuntu?

Question 2 · medium

Ravi's laptop has 8 GB of memory. How much should Docker get?

Question 3 · medium

Right after installing Docker Engine on Ubuntu, the setup check prints FAIL docker: permission denied on /var/run/docker.sock. What is the fix?

Question 4 · medium

Six lines of the setup check say OK, and one says FAIL disk: 7 GB free in /System/Volumes/Data, the lab needs 15 GB .... What should you do?

Question 5 · hard

Ravi ran sudo usermod -aG docker "$USER" and ran the setup check again in the same terminal. It still says FAIL docker: permission denied. Why?

The SOC analyst job: the work, the skills, the interviewNext: The lab in one command: your first alert