Hands-On LabBeginner

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.

45 minEstimated time
5Guided steps
AutoVerification
IsolatedSandbox
Your First Docker Containers - Pull, Run, and Manage

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:alpine and httpd:alpine images from Docker Hub and inspect the local image cache with docker images.
  • Run named, detached containers with -d, --name, and -p flags, then confirm they respond to HTTP requests on their published ports.
  • Inspect running containers using docker ps, docker exec -it, and docker logs to read state from both outside and inside the container.
  • Stop and remove containers cleanly using docker stop and docker rm and 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.

[CHECK] validation_activelive
Inspecting deployed resources...
Verifying configuration state...
✓ Step requirements satisfied

More labs like this

PremiumIncluded in Premium
Duration
45 min
Steps
5

Environment

Dedicated VM IDE

Every lab includes

  • Real environment, pre-credentialed
  • Automated checks on every step
  • Isolated sandbox, auto cleanup
  • AI-recommended next steps

Lab curriculum

  1. 01

    Getting Started with Docker IDE

  2. 02

    Pull Docker Images From Docker Hub

    1 automated check

  3. 03

    Run Named Containers With Published Ports

    1 automated check

  4. 04

    Inspect Containers With Exec and Logs

    1 automated check

  5. 05

    Stop and Remove Running Containers Cleanly

    1 automated check

Not the lab you were looking for?

Browse 150+ hands-on labs across AWS, Azure, Kubernetes, Docker, and cloud security.

Explore the catalog