← Phase 1: firewall and protocols on the wire

// guide · lab network · phase 1 · step 0 of 10 · 30 min, once

Set up your PC

Goal: Docker running on Windows, the lab downloaded into its own folder, and started for the first time.

The lab is four small Linux machines that run inside Docker. Docker Desktop runs them on Windows using WSL, Windows’ built-in Linux layer. You set this up once.

You need: Windows 11, or Windows 10 22H2, with 8 GB of memory, and the latest Docker Desktop (update it if you already have it). Docker Desktop is free for personal use, learning and small businesses; larger companies need a paid Docker subscription.

1. Open a terminal

Press the Windows key, type Terminal, and open Terminal (on Windows 10 without it, open Windows PowerShell instead). Every command in this guide is typed here. Copy one box at a time, paste it, and press Enter.

Don’t use PowerShell ISE. It isn’t a real terminal: it shows Docker’s normal messages as red errors and freezes when you step inside a machine.

2. Check virtualization is on

Docker needs your CPU’s virtualization feature. Open Task Manager (Ctrl + Shift + Esc), go to Performance > CPU, and look for Virtualization: Enabled. If it says Disabled, turn it on in your PC’s BIOS settings (often called Intel VT-x or AMD-V).

3. Install or update WSL

This installs WSL if it’s missing, then brings it up to date. An old WSL is the most common reason Docker Desktop won’t start.

copywsl --install --no-distribution
copywsl --update

If Windows asks you to restart, restart and reopen PowerShell.

4. Install Docker Desktop

copywinget install --id Docker.DockerDesktop -e

Start Docker Desktop from the Start menu and accept the terms. Signing in to a Docker account is optional. Wait until the bottom-left corner says Engine running.

5. Check Docker’s version

The lab uses a Docker feature added in version 28.

copydocker version --format "{{.Server.Version}}"

You should see a number starting with 28 or higher.

6. Install Git and make a folder for the lab

Git downloads the lab and lets you pull updates later. Close and reopen PowerShell after installing it.

copywinget install --id Git.Git -e
copyNew-Item -ItemType Directory -Path C:\Labs -Force

7. Download the lab

copySet-Location C:\Labs
copygit clone https://github.com/jasonmcginn/netstate-lab-network.git
copySet-Location C:\Labs\netstate-lab-network

From now on, run every command from this folder.

8. Build and start the lab

The first run builds the four machines from the files in images, so it takes a few minutes. Later starts take seconds.

copydocker compose up -d --build

You should see

At the end, the images built and four machines started:

Image netstate-lab/fw:dev Built
Container netstate-lab-fw-1 Started
Container netstate-lab-server-1 Started
Container netstate-lab-client-a-1 Started
Container netstate-lab-client-b-1 Started

In Docker Desktop, under Containers, a group called netstate-lab with four containers.

Stuck?

ProblemFix
Docker Desktop won’t start, or says WSL is too oldRun wsl --update, then wsl --shutdown, then start Docker Desktop again
docker or git is not recognizedClose and reopen PowerShell after installing
Red text with NativeCommandErrorYou’re in PowerShell ISE. Close it and use Terminal or Windows PowerShell
A command freezes when you step inside a machine (bash, telnet, ssh)Same cause: PowerShell ISE. Close the window and use Terminal. If Docker stays stuck, run wsl --shutdown and start Docker Desktop again
Cannot connect to the Docker daemonDocker Desktop isn’t running yet. Start it and wait for Engine running
Version below 28In Docker Desktop: Settings > Software updates

A worked example of tracking one of these down: the frozen shell.

Download Resume Email me