Tutorvo

Introduction to Containers

Lesson 1 of 86 minReading

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.

  • docker pull nginx downloads an image from a registry
  • docker run -d nginx starts a detached container
  • docker ps lists running containers
  • docker exec -it <id> sh opens a shell inside one

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 cluster or another cluster you own and control.

🎯 Challenge: Spin up a local single-node cluster in your own cluster, 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.
Knowledge check

Unlike a virtual machine, a container shares the host's...

Continues in this course
  • Docker & Image Security 6 min
  • Kubernetes Fundamentals 6 min
  • Common Misconfigurations 6 min
  • Attacking Clusters 6 min
  • Supply Chain Security 6 min
  • Cluster Hardening 6 min

Buy the course to unlock the remaining 7 lessons, the exam and the certificate.

Buy course — $9.99