Introduction to Containers

Free lesson 1 of 8 from Container & Kubernetes Security — Secure and attack cloud-native infrastructure. No account, no card.

Containers vs Virtual Machines

A virtual machine bundles a full guest operating system on top of a hypervisor, giving strong isolation at the cost of size and startup time. A container shares the host kernel and packages only the application and its dependencies, making it lightweight and fast to start.

Because containers share the host kernel, isolation relies on kernel features like namespaces (separating process, network, and mount views) and cgroups (limiting CPU and memory). Weakening these controls is what turns a container boundary into a security problem.

Docker Basics

Docker is the most common tool for building and running containers. An image is an immutable template; a container is a running instance of that image. Images are described by a Dockerfile and stored in registries.

Building a Local Lab

For safe practice you only need your own machine. Install Docker, then add a lightweight local Kubernetes distribution such as kind or minikube so you can create and destroy clusters at will.

docker --version
kind create cluster --name lab
kubectl get nodes

Everything in this course should be performed only against this disposable lab or another cluster you own and control.

🎯 Challenge: Spin up a local single-node cluster in your lab, run a simple nginx container, and confirm you can list both the node and the container. Note down which kernel isolation feature keeps that container separated from your host.

⚖️ For authorized, legal testing only.

Liked it? 7 more lessons are waiting.

8 lessons · knowledge checks · final exam · verifiable certificate · in-browser Live-Lab

Unlock all courses · CHF 9/month Buy only this course · CHF 19

What's in Container & Kubernetes Security

Continue in the interactive course reader →