Chapter 3 Docker
Containerisation has revolutionised how we develop, deploy and manage applications. At the heart of this revolution is Docker, an open-source platform that has become the industry standard for containerisation technology. Throughout this book, we’ll use Docker to create isolated environments that simulate real-world infrastructure, allowing us to explore and implement Zero Trust principles in a controlled setting. Docker enables us to package applications and their dependencies into standardised units called containers. Each container runs as an isolated process on the host operating system, sharing the kernel but maintaining strict boundaries for resources, filesystems and network access. This isolation provides several key advantages for our security testing environment: we can quickly create and destroy compromised systems, test security controls without affecting production environments and ensure consistent behaviour across different testing scenarios. Unlike traditional virtual machines that require a full operating system for each instance, containers are lightweight and start up in seconds. They share the host system’s kernel while maintaining isolation through Linux namespaces and control groups (cgroups). This architecture makes Docker particularly well-suited for our purpose of creating multiple interconnected services that mirror real-world infrastructure.
The host systems limit these containers. Only one container can use a specific port. That ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access