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
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
Verified against your live environment
An automated validation engine inspects your actual resources and configurations as you work. Completion means the task was performed, not multiple choice, real-world proficiency.
More labs like this
Running Containers with docker run and kubectl
Run nginx:alpine first with docker run then with kubectl run on the same VM, and see how Kubernetes maps onto Docker concepts.
Deploy Multi-Container Apps with Docker Compose
Author a compose.yaml that runs nginx, a Python API, and Postgres as a single declarative multi-service stack.
Speed Up Docker Builds with Layer Caching and dockerignore
Refactor a slow Dockerfile to leverage layer caching, add a .dockerignore to shrink the build context, and inspect the resulting image with docker history and docker diff.
Environment
Every lab includes
- Real environment, pre-credentialed
- Automated checks on every step
- Isolated sandbox, auto cleanup
- AI-recommended next steps
Lab curriculum
- 01
Getting Started with Docker IDE
- 02
Pull Docker Images From Docker Hub
1 automated check
- 03
Run Named Containers With Published Ports
1 automated check
- 04
Inspect Containers With Exec and Logs
1 automated check
- 05
Stop and Remove Running Containers Cleanly
1 automated check
Skills validated
Not the lab you were looking for?
Browse 200+ hands-on labs across AWS, Azure, Kubernetes, Docker, and cloud security.