Docker container Technology¶
Docker is an open-source platform designed to automate the deployment, scaling, and management of applications by using containerization technology^[100-docker.md].
Containers allow a developer to package up an application with all of the parts it needs, such as libraries and other dependencies, and ship it all out as one package^[100-docker.md]. By doing so, the application can run reliably in any computing environment, resolving the common issue of "it works on my machine"^[100-docker.md].
Core Concepts¶
container vs. Virtual Machine¶
While both Virtual Machines (VMs) and Docker containers aim to isolate applications and provide a consistent environment, they differ significantly in their architecture^[100-docker.md].
- Virtual Machines: A virtual machine includes a full copy of an Operating System (OS), the application, and necessary binaries/libraries, making them significantly large (often gigabytes in size)^[100-docker.md].
- Docker Containers: Containers share the host machine's OS kernel^[100-docker.md]. They do not require a full OS installation. Instead, they include only the application and its specific dependencies^[100-docker.md].
This structural difference means containers are much more lightweight and efficient than VMs^[100-docker.md].
Key Components¶
Docker technology relies on three main components^[100-docker.md]:
- Images: An image is a read-only template with instructions for creating a Docker container. It acts as a blueprint for the application^[100-docker.md].
- Containers: A container is a runnable instance of an image. It encapsulates the application code, runtime, system tools, libraries, and settings^[100-docker.md].
- Registries: A registry (like Docker Hub) is where Docker images are stored and shared^[100-docker.md]. It serves as a library of pre-built templates.
Benefits¶
- Lightweight and Fast: Because containers share the host kernel and do not include a full OS, they require fewer resources (e.g., disk space, memory) and boot up in seconds^[100-docker.md].
- Portability: "Build once, run anywhere." A container packaged on a developer's laptop will run identically on a testing server or in the cloud^[100-docker.md].
- Isolation: Containers isolate applications from each other and from the underlying infrastructure, providing better security and preventing dependency conflicts^[100-docker.md].
Related Concepts¶
- [[Virtual Machines]]
- Microservices Architecture
- DevOps
Sources¶
100-docker.md