Skip to content

Chapter 1 of 7

Foundations of Containers and Docker

A container is a lightweight, standalone, executable package that bundles an application together with everything it needs to run: the application code, a runtime, libraries, and all of its dependencies. Because the package is self-contained and isolated from the host system, the application behaves the same way regardless of where it is deployed. The broader practice of packaging software this way is called containerization, a virtualization method that operates at the operating system level rather than the hardware level.

This approach differs significantly from traditional virtual machines. Virtual machines include a full guest operating system on top of a hypervisor, which makes them larger, slower to boot, and more resource-intensive. Containers, by contrast, share the kernel of the host operating system and only package what is unique to the application. As a result, containers start in seconds and consume far less memory and disk space, allowing many more of them to run on the same physical hardware.

Docker is the most widely adopted platform that implements containerization. It automates the building, deployment, scaling, and management of containerized applications, and it introduces two key concepts that recur throughout the ecosystem. A Docker image is a read-only template containing the application's code, dependencies, libraries, and configuration. A Docker container is a runnable instance created from that image, providing the isolated environment where the application actually executes. Images are typically stored and shared through registries, with Docker Hub being the largest public registry where developers can publish and pull images for reuse.

All chapters
  1. 1Foundations of Containers and Docker
  2. 2Docker Architecture, Installation, and Core CLI
  3. 3Building Images with Dockerfile
  4. 4Running and Managing Containers
  5. 5Data Persistence and Networking
  6. 6Docker Compose and Orchestration with Swarm
  7. 7Security and Troubleshooting

Drill it

Reading is not remembering. These come from the Docker And Containers deck:

Q

What is a container in computing?

A container is a lightweight, standalone, executable package that includes everything needed to run a piece of software, such as code, runtime, libraries, and d...

Q

What is containerization?

Containerization is a virtualization method that packages an application and its dependencies into a container, enabling consistent deployment across different...

Q

What is Docker?

Docker is an open-source platform that automates the deployment, scaling, and management of applications inside containers using containerization technology.

Q

What is the difference between a container and a virtual machine?

Containers share the host OS kernel and are lightweight, starting in seconds, while virtual machines include a full guest OS, making them heavier and slower to...