TechWorld with Nana — DevOps Bootcamp Module 7
First time doing hands-on Docker work. All commands run in PowerShell on Windows
with Docker Desktop (WSL2 backend).
| Folder | What I practised |
|---|---|
| lab-01-containers | pull, run, exec, logs, port binding, two Postgres versions side by side |
| lab-02-dockerfile | writing a Dockerfile, building images, fixing a broken build |
| lab-03-shoptrack | Docker Compose, MongoDB + Mongo Express, volumes, service networking |
| lab-04-troubleshooting | port conflicts, auth failures, broken Dockerfiles, PowerShell quoting |
These aren't in a tutorial — they came from actually doing it wrong:
- "Cannot connect to Docker daemon" — Docker Desktop wasn't running. Fixed by opening it and setting it to start on login.
- "pull access denied" — forgot the
--nameflag, Docker treated my container name as an image name and tried to pull it from Docker Hub. - Missing dot on
docker build— got "requires exactly 1 argument". The dot means "current directory as build context" and is required. - PowerShell double quotes breaking
--format— PowerShell expands{{ }}before Docker sees it. Must use single quotes. - storedKey mismatch repeating forever — fixed the wrong password in the yaml but the old hash was baked into the volume. Had to
docker-compose down -vto wipe it. - Trying to run docker commands from inside a container — Docker doesn't exist inside containers. Had to
exitthe shell first. - Browser showing "page isn't working" after
docker-compose up— opened it too fast. Mongo Express takes 10-15 seconds to initialise.
Images vs containers: image = the blueprint (recipe). Container = the running instance (actual cake). docker run always creates a new container. docker start restarts an existing stopped one.
Port binding: format is always -p HOST:CONTAINER. You use the host port from your browser. Two containers can share the same internal port as long as they use different host ports.
Service names in Compose are hostnames: whatever you name a service in docker-compose.yaml becomes its DNS hostname on the shared network. That's why it's ME_CONFIG_MONGODB_SERVER=mongodb and not localhost — localhost inside a container means the container itself.
Volumes persist data: docker-compose down preserves volumes. docker-compose down -v deletes them. The container path in a volume mount (e.g. /data/db) is defined by the image author, not you — check Docker Hub.
- Windows 11, Docker Desktop with WSL2 backend
- PowerShell for all commands
- Docker version 27.3.1