What Is Docker?
Docker is an open platform for developing, shipping, and running applications in isolated environments called containers. It packages an application with all its dependencies so it runs the same way on a laptop, in a data center, or in the cloud. When teams compare Docker vs Kubernetes, they start with Docker, because it provides the runtime and image format that cluster orchestrators depend on.
Docker is written in Go and builds on the open-source Moby project. Docker Engine and the Docker CLI are licensed under Apache 2.0. Containers are isolated with Linux kernel namespaces, while control groups (cgroups) enforce resource limits. For a deeper introduction, read our article on Docker containerization.
By default, Docker drops most Linux kernel capabilities and applies a seccomp profile that blocks roughly 44 of more than 300 system calls. It also supports Rootless mode, user namespaces, AppArmor, and SELinux. The daemon (dockerd) itself runs as root by default, which shapes many security decisions.
The engine is open source, but commercial use of Docker Desktop in companies with more than 250 employees or more than USD 10 million in annual revenue requires a paid subscription. Current terms are in the official Docker documentation. Docker has also added AI tooling: Docker Model Runner for local LLM inference, Docker Sandboxes for isolating coding agents, and an MCP Catalog and Toolkit.
How Docker Works
Docker uses a client-server architecture. The docker CLI talks to the background daemon (dockerd) through a REST API over a UNIX socket or a network interface, and the daemon builds, pulls, and runs images on the host kernel.
Images are read-only, immutable templates made of layers. Each Dockerfile instruction creates a layer with a specific set of filesystem changes. When a container starts, Docker adds a thin writable layer on top of the image layers.
That writable layer lives and dies with the container. Deleting the container destroys any changes that were not saved to persistent storage such as volumes or bind mounts, which is why stateful data never belongs inside the container itself.
At runtime the daemon applies kernel isolation and security profiles. BuildKit, the build engine, runs built-in build checks before execution, catching problems such as a CMD instruction that does not use JSON array syntax and would break graceful shutdown.
Images built with Docker follow the OCI standard, so the same artifact runs locally, in CI, and on any OCI-compatible runtime such as containerd in Kubernetes. The main components of the platform are listed in the table below.
| Component | Role in the platform | Typical use |
|---|---|---|
| Docker Engine | The dockerd daemon, the REST API, and the docker CLI. | Running containers on a host. |
| Docker Build / BuildKit | Executes Dockerfiles into layered images and runs build checks. | Repeatable image builds in CI. |
| Docker Compose | Defines multi-container applications in a compose.yaml file. | Local stacks with databases and brokers. |
| Docker Desktop | Integrated environment for Mac, Windows, and Linux. | Developer workstations, including local Kubernetes. |
| Docker Hub and Docker Scout | Image registry, plus supply chain and vulnerability analysis. | Distributing and auditing images. |
We recommend Docker whenever a team needs deterministic builds and identical behavior from laptop to production. Two mistakes cause most incidents: writing data to the container’s writable layer, which disappears when the container is replaced, and mounting /var/run/docker.sock into CI runners, which effectively grants root on the host. We run containers as non-root users, keep state in volumes, and use multi-stage builds from the first commit.
Container platform and runtime
Apache 2.0 engine and CLI; Docker Desktop subscription for larger companies
Reproducible builds, portable images, fast local setup
Compose, BuildKit, Docker Hub, Docker Scout
Years in business
Senior engineers
Projects delivered
What Docker Is Used For
Engineering teams use Docker to standardize local environments, automate CI/CD pipelines, run portable workloads across clouds, and harden their software supply chain.
Consistent Local Environments
Teams describe the application stack, databases, and message brokers in Dockerfiles and compose.yaml files, so every engineer on Mac, Windows, or Linux runs identical dependency versions.
CI/CD Pipelines
Build servers package code into an immutable image once, run integration tests against ephemeral containers, and promote the same image to staging and production without rebuilding.
Portable Hybrid and Multi-Cloud Workloads
Because containers share the host kernel and carry their own dependencies, workloads move between on-premises servers and cloud providers without rewriting deployment scripts, and more instances fit on the same hardware.
Secure Supply Chains and AI Sandboxes
Regulated teams build on Docker Hardened Images with signed SBOMs and SLSA provenance, while AI teams run local models with Docker Model Runner and isolate coding agents in Docker Sandboxes.
Docker vs Kubernetes and Podman
Docker builds and runs containers, Kubernetes schedules them across clusters, and Podman is a daemonless Docker alternative that runs rootless by default. In a Docker vs Kubernetes decision, most teams use both. Compared with a virtual machine, a container shares the host kernel while a VM boots a full operating system.
| Criterion | |||
|---|---|---|---|
| Primary role | Builds, packages, and runs individual or local multi-container applications. | Schedules, scales, load-balances, and self-heals containers across node clusters. | Builds and runs containers without a daemon, with Buildah and Skopeo for images and registries. |
| Architecture | Client-server: the docker CLI talks to the dockerd daemon. | Control plane managing worker nodes that run CRI runtimes such as containerd. | Daemonless fork-and-exec model with a Docker-compatible CLI. |
| Security model | Daemon runs as root by default; drops capabilities, filters syscalls, supports Rootless mode. | Cluster-level policies; container isolation handled by the node runtime. | Runs rootless by default, with no privileged background daemon. |
| Multi-node operation | Docker Swarm for simple clustering; Docker Desktop runs local single- or multi-node Kubernetes clusters with kind. | Native multi-node scheduling, autoscaling, and self-healing. | Focused on single-node execution; can generate Kubernetes YAML. |
| Developer tooling | Docker Desktop, Compose, BuildKit, Docker Hub, and Docker Scout. | kubectl, Helm, and a large CNCF ecosystem. | Podman Desktop and alias docker=podman compatibility. |
| Best fit | Local development, CI/CD builds, single-host deployments, and small clusters. | Large-scale, high-availability microservices. | Environments whose security policy forbids a root daemon. |
When to Choose Docker
Choose Docker when you want a complete developer experience with Docker Desktop, Compose, BuildKit, and Docker Scout to build OCI images, standardize local setups, and automate CI/CD. For smaller multi-host deployments where a full Kubernetes control plane adds unnecessary complexity, Docker Swarm is simpler to learn and operate.
When Docker Is Not the Right Fit
Standalone Docker Engine is not enough when you need automated multi-node scaling, cross-node self-healing, and cluster load balancing; run Docker-built images on Kubernetes instead. If policy forbids a root background daemon, choose Podman, which runs rootless by default. If a workload needs a different OS kernel or hardware-level isolation, use virtual machines rather than containers.
How We Approach Docker Projects
We treat containerization as a discipline in supply chain security, build repeatability, and runtime efficiency, applying Docker best practices from the first Dockerfile through to Kubernetes and Docker deployments.
Lean, Multi-Stage Images
Every repository gets a .dockerignore that keeps .git, node_modules, and secrets out of the build context. Multi-stage builds separate compilers and SDKs from the runtime image, built on minimal trusted bases or Docker Hardened Images.
Build Checks and Clean Shutdowns
BuildKit build checks lint every Dockerfile before execution, for example flagging CMD instructions without JSON array syntax that would break signal handling. Each container has one primary concern and switches to a non-root USER.
Locked-Down Daemon Access
Access to /var/run/docker.sock or the remote API equals root on the host, so we never expose it to untrusted users or containers. We keep the default capability drops and seccomp filtering, add AppArmor or SELinux, and evaluate Rootless mode.
Sound like the right partner?
Frequently Asked Questions
Direct answers to common architectural, licensing, and operational questions when evaluating Docker.
Is Docker free for commercial use?
Docker Engine, the Moby project, and the Docker CLI are free under the Apache License 2.0, and Docker Personal costs nothing for individual use. Commercial use of Docker Desktop in companies with more than 250 employees or more than USD 10 million in annual revenue requires a paid Pro, Team, or Business subscription. Paid plans add unlimited Docker Hub pulls and private repositories subject to fair use. Check current plans on the official Docker pricing page.
Can Docker and Kubernetes be used together?
Yes. Teams routinely build images with Docker and deploy them to Kubernetes. Kubernetes dropped Docker Engine as a node runtime in favor of Container Runtime Interface (CRI) runtimes such as containerd, but Docker-built images are OCI-compliant and run natively in Kubernetes. Docker Desktop can also create local single- or multi-node Kubernetes clusters, using kind, for testing manifests.
What is the difference between a Docker image and a Docker container?
An image is a read-only, immutable template made of filesystem layers created by Dockerfile instructions. A container is a running instance of that image, with a writable layer added on top for runtime changes. If the container is deleted, anything written to that layer is lost unless it was stored in a volume or bind mount.
Why use Podman instead of Docker?
Teams choose Podman mainly to avoid the privileged background daemon, which runs as root by default and becomes a host-compromise risk if the Docker socket is exposed. Podman uses a daemonless fork-and-exec architecture, runs rootless by default, and delegates building and registry work to Buildah and Skopeo. Its CLI is compatible with Docker, so alias docker=podman keeps daily workflows unchanged.
What are the most important Docker best practices for production?
Use multi-stage builds and a .dockerignore file so build dependencies and local directories never reach the production image. Start from minimal trusted base images, keep one primary concern per container, and run as a non-root user with the USER instruction. On the host, never expose /var/run/docker.sock or an unauthenticated daemon API, keep the default capability drops and seccomp filter, and add Rootless mode, user namespaces, AppArmor, or SELinux for defense in depth.