Docker
Package an app once, run it anywhere. Build images that don't double in size every Friday.
beginner22 labs
Recommended first
You can still start this course now. Earlier courses give you the mental model the labs here assume.
By the end you'll be able to
- Build images that don't ship your .env file
- Debug a running container without rebuilding
- Compose multi-service stacks locally
- Read a Dockerfile and predict what it'll produce
Labs
- 01StartContainer vs virtual machineForm a mental model of how a container differs from a virtual machine so the rest of the Docker labs make sense.10 min
- 02StartImage vs containerPull a small image, start two containers from it, and see one image produce many running instances.12 min
- 03StartImage layers and copy-on-writeLook inside an image to see the layer stack, then write a file in a running container to see copy-on-write at work.12 min
- 04StartDockerfile in one minuteLook at the three instructions every Dockerfile needs and build a one-line image from them.10 min
- 05Startdocker run and the flags that matterRun containers in foreground, detached, and interactive mode, and learn the half-dozen flags you reach for every day.15 min
- 06Startdocker ps and how to filter itRead the docker ps table, list stopped containers with -a, and trim the output with --format and --filter.10 min
- 07Startdocker exec into a running containerRun a command inside a container that is already running, and open an interactive shell to look around.12 min
- 08StartStop, remove, and prune containersStop a running container, remove a stopped one, and reclaim space with docker container prune.10 min
- 09StartFROM, RUN, CMD in a real DockerfileBuild an image that installs a package at build time and runs a command at start time.15 min
- 10StartCOPY, ADD, and .dockerignoreCopy files into an image, see what ADD does on top, and trim the build context with .dockerignore.15 min
- 11StartMulti-stage buildsCompile in a fat builder stage, then copy only the binary into a tiny runtime stage.18 min
- 12StartTagging and versioning imagesTag an image with a version, a moving alias, and a registry path so later pushes go to the right place.12 min
- 13StartImage cleanup and layer inspectionSee how dangling images appear, look inside an image with docker history, and reclaim disk with docker image prune.12 min
- 14StartPublishing container portsMap a container port to a host port with -p, see the difference vs --expose, and pick a host port at random.12 min
- 15StartCustom bridge networks and DNSCreate a user-defined bridge network, attach two containers, and let them talk by container name.14 min
- 16StartNamed volumes for persistent dataCreate a named volume, write data into it from one container, and read it back from a fresh one.12 min
- 17StartBind mounts and host pathsMount a host directory into a container, see writes show up on both sides, and learn when to pick a bind mount over a named volume.12 min
- 18StartCompose, a one-file stackWrite a compose.yaml with one service, run docker compose up, and see one file describe a whole stack.15 min
- 19Startdepends_on and healthchecksOrder two services with depends_on, gate startup with a healthcheck, and see the difference between started and healthy.18 min
- 20StartCompose environment variables and .envPass environment variables into a service from inline, from a list, and from a .env file.15 min
- 21StartDiagnose a container that will not stay upA container exits the moment it starts. Read its state and its logs to find why, then start it correctly so it stays running and answers.14 min
- 22StartCapstone, build an image and serve it on a networkAn open-ended problem with no prescribed commands. Build your own image that serves a known string, run it under a name on a user-defined network, and prove a second container reaches it by that name.25 min