Docker
What a container is and what it is for
A container is a lightweight, isolated package that bundles your application code together with everything it needs to run: runtime, system libraries, dependencies and configuration. Because that environment travels with the application, a container behaves identically wherever it runs, which removes the classic "it works on my machine" problem.
Containers are built from images. A Docker image is an immutable, read-only template defined by a Dockerfile; running an image produces a container. Images are versioned and shared through registries such as Docker Hub, so a team can pull the exact same build everyone else is using.
In a B2B development context, Docker is typically used to:
- Standardize local development environments across a whole team, regardless of each developer's operating system.
- Guarantee parity between development, staging and production to reduce deployment incidents.
- Package microservices independently so each can be built, scaled and updated on its own.
- Power continuous integration and continuous delivery (CI/CD) pipelines with reproducible builds.
- Serve as the foundation for orchestration platforms such as Kubernetes when scaling across multiple servers.
Docker container vs. virtual machine
Both containers and virtual machines isolate workloads, but they do it at different layers. A virtual machine virtualizes hardware and runs a full, separate guest operating system on top of a hypervisor. A Docker container virtualizes the operating system: containers share the host machine's kernel and isolate only the application layer. This makes containers far lighter and faster to start than VMs.
| Criterion | Docker container | Virtual machine |
|---|---|---|
| Isolation level | Operating-system level (shared host kernel) | Hardware level (full hypervisor) |
| Guest OS | None — uses the host kernel | A complete guest OS per VM |
| Size | Typically megabytes | Typically gigabytes |
| Startup time | Seconds or less | Minutes |
| Resource overhead | Low | Higher |
| Density per host | High (many containers) | Lower (fewer VMs) |
| Isolation strength | Strong, but shares the kernel | Stronger, fully separate kernels |
The two approaches are not mutually exclusive. A common production pattern runs Docker containers inside virtual machines, combining the strong isolation boundary of the VM with the portability and density of containers.
Questions fréquentes
Building a custom software project? We design bespoke software aligned with your roadmap.
See our custom software expertiseDéfinitions liées