The Desi Architect
Notes / Docker Sandboxes / My Lab Does Not Start: A Step-by-Step Check
Track 06 · Docker Sandboxes · Reference

My Lab Does Not Start: A Step-by-Step Check

Work through these checks in order. Each one is two minutes. Most problems are found by step 3.

Free referenceKeep this tab open while you do a lab

00 /Step 1: Is Docker running?

docker info

You should see: a Client section and a Server section. If it says it cannot connect to the daemon, open Docker Desktop and wait until it says running. On Windows see the Windows Troubleshooting guide.

01 /Step 2: Are you in the right folder?

ls
# you should see docker-compose.yml in this folder

If you see "no configuration file provided", you are in the wrong folder. Unzip the lab into its own folder and cd into it. Compose commands only work in the folder that holds docker-compose.yml.

02 /Step 3: What does Docker say about each container?

docker compose ps -a
docker compose logs --tail 30
You seeIt usually meansDo this
Exited (1)The app crashed on start.Read the last lines of docker compose logs. The error is usually there in plain words.
Exited (137)Killed for using too much memory.Give Docker Desktop more memory (Settings, Resources). Close heavy programs.
(health: starting) for a long timeIt is still starting, or the check fails.Wait a minute, then docker compose logs.
unhealthyThe healthcheck keeps failing.Read the logs of that service.
Nothing listedNothing started.Run docker compose up -d and read the error it prints.

03 /Step 4: Is a port already taken?

You see: port is already allocated or address already in use.

docker ps --format "{{.Names}}  {{.Ports}}"

Usually another lab is still running. Go to that lab's folder and run docker compose down -v. If a program on your computer owns the port, close it, or change the left number in ports: in docker-compose.yml (for example "127.0.0.1:18111:8080"). Only the left number is yours to change.

04 /Step 5: Start from a clean state

docker compose down -v
docker compose up -d --wait

A leftover volume or container from an earlier try can confuse a lab. down -v removes this lab's containers, network and volumes, so the next start is fresh. It deletes only this lab's data.

05 /Step 6: Is the image downloading?

The first start downloads images. A slow connection can look like a hang. Run docker compose up (without -d) once to watch the progress. If you see i/o timeout or toomanyrequests, check your network and VPN, and sign in with docker login.

06 /Step 7: Is the disk full?

docker system df

If Docker uses most of your disk, remove what you do not need: docker container prune, docker image prune. Be careful with docker system prune --volumes: it deletes volumes of every project.

07 /Step 8: Still stuck?

Collect the facts before you ask. They make a fix quick:

docker version
docker compose ps -a
docker compose logs --tail 50 > logs.txt
  • The name of the lab and the command you ran.
  • Your operating system, and whether it is a Mac with Apple Silicon.
  • The exact error message, copied as text and not as a screenshot.
  • The file logs.txt.