Using Containerization

Module 6.8-6.13: Containerization Concepts

Containerization Concepts

📅 August 1, 2026  •  ⏱️ 10 min read  •  🎓 Intermediate

🎯 Exam Objectives

🎯
Exam Objective 1.6: Compare and contrast containerization concepts.

Track your learning progress! Click each objective as you master it:

  • Understand container architecture vs virtual machines
  • Master the container workflow: config → image → running container
  • Use Docker commands for container management
  • Deploy containers using cloud registries
  • Configure port mapping and storage types

📦 Containers vs Virtual Machines

Containers offer a different form of virtualization from VMs. While VMs virtualize hardware, containers virtualize the operating system, making them lightweight and portable.

🖥️ Virtual Machines

  • Virtualizes hardware
  • Includes full guest OS
  • Heavyweight (GBs)
  • Boot time: Minutes
  • Strong isolation

📦 Containers

  • Virtualizes OS
  • Shares single OS kernel
  • Lightweight (MBs)
  • Boot time: Seconds
  • Process-level isolation
💡 Container Characteristics: Containers are complete, portable solutions containing application code, runtime, libraries, and settings. They are lightweight, share a single OS (usually Linux), and provide a single function.

🔄 Container Lifecycle Workflow

Click each stage to understand the container creation process:

📄
Configuration File
Dockerfile with instructions
🖼️
Container Image
Built template (docker build)
Running Container
Executing instance (docker run)
Configuration File (Dockerfile): This text file contains everything necessary for the container to function: source code, libraries, tools, dependencies, etc. Think of this as a specifications sheet or set of instructions. The container engine processes this file to build the image.
Docker Workflow Example
# Step 1: Build image from Dockerfile
$ docker build -t myapp:latest .
# Step 2: Run container from image
$ docker run -d -p 8080:80 myapp:latest
# Step 3: Check running containers
$ docker ps

⌨️ Docker Command Reference

The docker command is the primary management tool. Here are essential commands:

Core Docker Commands

Command Description Example
docker pull Pull an image from a registry docker pull alpine
docker run Run a command in a container docker run -it alpine bash
docker ps List containers docker ps -a
docker images List images docker images
docker rm Remove containers docker rm container-id
docker rmi Remove images docker rmi image-name

Container Management Commands

Command Description
docker container start Start a stopped container
docker container stop Stop a started container
docker container restart Restart a container
docker container logs Display container logs
docker container inspect Display detailed container information

🗄️ 6.11 Image Registries

Container image registries are storage repositories for container images. They integrate with DevOps and CI/CD processes, allowing orchestration to pull images on the fly.

🌐
Docker Hub
Public Registry: Convenient, cost-effective, and straightforward. Perfect for getting started and accessing common images like Alpine, Python, or Nginx.
🔒
Private Registry
Enterprise Solution: On-premises or private cloud. Better for maintaining images, securing resources, and maintaining control over proprietary applications.
☁️
Cloud Registries
Cloud-Native: AWS ECR, Azure Container Registry, Google Artifact Registry. Integrates container storage with cloud-based infrastructure.
✅ Registry Advantages: Scalability, Security, Management Control, and Automation/Orchestration Integration.

☁️ 6.12 Containers in the Cloud

Cloud container services provide scalability, metered services, high availability, and reduced management overhead compared to on-premises solutions.

🛠️ Cloud Container Services

  • Amazon ECS: Run, monitor, and scale apps with AWS integration
  • Azure Kubernetes Service: Run containers on Kubernetes
  • Google Compute Engine: Manage containers on Kubernetes/Docker

📋 Deployment Steps

  1. Create container instance
  2. Name and select region
  3. Choose image from registry
  4. Select CPU/Memory size
  5. Configure networking
  6. Tag for billing

🔧 6.13 Container Management

Port Mapping

Port mapping associates container ports with host ports, providing access between the container and external networks.

External Client
Port 8080
Host System
Port 8080
Container
Port 80 (Nginx)
Port Mapping Example
# Map host port 8080 to container port 80
$ docker run -d -p 8080:80 nginx
# Now accessible at http://localhost:8080

Storage Types

Containers support two main storage types. Click each to learn more:

Non-permanent storage tied to the container's lifecycle. Created and removed along with the container.

Use Cases:
  • Data caching
  • Container logging
  • Temporary scratch space

Independent of the container's lifecycle. Stores data even if the container is stopped or deleted. Necessary for stateful applications.

Implementation:
  • Persistent storage volumes point to actual storage media
  • Can be statically or dynamically configured
  • Shared across container clusters (e.g., AWS EKS + EFS)

Orchestration

Container workload orchestration enables large-scale management using DevOps approaches. It provides:

Efficient deployments Automated management Scheduling Increased scalability High availability
Automation Integration: Automation helps configure port mapping and ephemeral/persistent storage as part of larger orchestrated management processes.

Module 6.8-6.13: Containerization Concepts © 2026 | Interactive Learning Blog