Docker
Docker packages an application and its dependencies into an image and runs it as an isolated container. The same image runs on a laptop, in a CI pipeline and in production on ECS, Fargate or EKS.
Key concepts #
- Docker Engine: the daemon (
dockerd) that builds images and runs containers through containerd and runc. - Docker CLI: the
dockercommand, a client that talks to the daemon. - Image: a read-only stack of layers with the application and its metadata. See Docker basics.
- Container: a running instance of an image, a Linux process isolated with namespaces and cgroups.
- Registry: where images are stored and shared: Docker Hub, Amazon ECR and others.
- Dockerfile and Compose: the files that describe how to build an image and how to run several containers together.
On macOS and Windows, Docker needs a Linux VM. Rancher Desktop and Docker Desktop provide it.
Learn it #
The series Docker and Rancher Desktop goes from the first container to Compose, BuildKit, image security and a local Kubernetes cluster.
More tutorials that use Docker
- Rancher Desktop: containerd vs dockerd, nerdctl vs Docker CLI
- Istio Patterns: Traffic Splitting in Kubernetes (Canary Release)
- Docker Volumes and Bind Mounts: Persist Data in Containers
- Terraform Docker Provider: Manage Containers and Images as Code
- Terraform AWS ECS Fargate Cluster Deployment & Docker Container Publishing
- Docker and Rancher Desktop Troubleshooting: Common Errors and Fixes
- Docker Image Security: Scan with Trivy and Harden Your Containers
- Docker Compose Tutorial: Run Multi-Container Apps with One File