Your First Docker Containers - Pull, Run, and Manage
Pull images from Docker Hub, run named containers with published ports, exec into them, view logs, then stop and remove them cleanly.
Lab Overview & Objectives
Containers package an application together with its filesystem, libraries, and runtime configuration so that the same software runs identically on a laptop, a CI runner, or a production server. Docker, the dominant container runtime, draws a clean line between two ideas that beginners often confuse: an image, which is an immutable, layered template stored in a registry like Docker Hub, and a container, which is a writable, running process instantiated from that image. A single image can spawn dozens of independent container instances, each with its own lifecycle, network ports, and logs - which is what makes Docker such a powerful unit of deployment.
In this lab, you will walk through the everyday lifecycle of a container from start to finish - pulling images from a public registry, running them as named and network-reachable instances, looking at them from both the outside and the inside, and tearing them down so nothing leaks between experiments. By the end you will have the muscle memory for the loop most engineers run dozens of times a day, and a clear mental model of where images, containers, ports, and logs each fit.
Objectives
Upon completion of this beginner level lab, you will be able to:
- Pull the
nginx:alpineandhttpd:alpineimages from Docker Hub and inspect the local image cache withdocker images. - Run named, detached containers with
-d,--name, and-pflags, then confirm they respond to HTTP requests on their published ports. - Inspect running containers using
docker ps,docker exec -it, anddocker logsto read state from both outside and inside the container. - Stop and remove containers cleanly using
docker stopanddocker rmand verify nothing is left running.
Who is this lab for?
This lab is designed for:
- Developers running their first container
- Sysadmins moving from VMs to containers
- Students or career-changers learning DevOps fundamentals
Real-Time Validation
Our platform uses an automated validation engine to verify your configurations as you work through the lab modules. No multiple choice—just real-world proficiency.