35 articles
Knowledge Base
Docker
35 articles in the Docker category · page 1 of 2.
- Docker PHP security update: rebuild, pin and verify Get the PHP2Shell fix into your PHP containers by rebuilding them on a fixed official php image and pinning that image by digest. You will recreate every container and prove that each one runs the new image and reports a fixed PHP version.
- Run the Docker daemon rootless instead of adding people to the docker group Learn how to run Docker rootless mode on a Linux server, so people can use containers without joining the docker group, which is the same as having root. The guide walks through the prerequisites, starting the daemon under a normal user account, and the features you give up.
- Build and push multi-architecture container images with Docker Buildx Learn how to build container images that run on both amd64 and arm64 servers from one machine with Docker Buildx. You will set up a builder that supports several platforms, choose between emulation and a native build node, speed up rebuilds with a shared cache, and fix exec format error.
- cAdvisor explained: what it exposes, when you need it, and the Prometheus setup that works cAdvisor reads cgroup accounting and exposes per-container CPU, memory, network and filesystem metrics to Prometheus. What each container_ family means, how to run cAdvisor on Docker and containerd, and when the kubelet already gives you the same data.
- Generate an SBOM with Syft and gate CVEs with Grype Build a real SBOM for a container image with Syft, then scan that artifact with Grype instead of re-scanning the image: fail-on thresholds, a .grype.yaml ignore file, a fresh vulnerability DB in CI, and SBOM diffs between two tags.
- Ship a distroless Docker image — multi-stage build and how to debug it Convert a full base image into a distroless docker image with a multi-stage build, survive the missing shell, CA bundle and timezone data, and debug a running container that has neither shell nor package manager.
- Docker restart policy — no, on-failure, always, unless-stopped How each Docker restart policy behaves on exit codes, backoff, and daemon restart — plus the common myth that a restart policy reacts to healthcheck status.
- Docker Bind Mount vs Named Volume — A Decision Guide A practical decision guide for Docker bind mount vs named volume — portability, backups, permissions, macOS/Windows performance, the --mount vs -v syntax, read-only mounts, and volume backup.
- Docker host out of disk: overlay2 filled /var/lib/docker Trace "no space left on device" back to image layers, container logs, build cache or volumes, reclaim space in order of safety, and keep the host from filling again.
- Writing and applying a custom seccomp profile for Docker containers Build a minimal seccomp allowlist for a Docker container: how seccomp-bpf filters syscalls, what the default profile already blocks, discovering the syscalls your app needs, and applying the profile with security_opt, cap-drop and no-new-privileges.
- How to Back Up and Restore Docker Volumes A practical docker volume backup guide using the busybox/alpine tar sidecar pattern, restoring into a fresh volume, and handling live databases safely.
- Docker Compose watch: live-reload your app inside containers Set up docker compose watch so edits on your host sync into the running container automatically. Covers the develop.watch config with sync, sync+restart, and rebuild actions.
- Docker Compose depends_on with healthcheck: wait until a service is actually ready Plain depends_on only waits for a container to start, not to be ready. Use docker compose depends_on condition service_healthy with a healthcheck to make the app wait for the container to be truly ready.
- Docker secrets handling — env vars, files, and Docker secrets Keep credentials out of images, off the command line, and out of inspect output. Patterns for plain Docker, Compose, and Swarm — and where to escalate to a real secrets manager.
- BuildKit cache mounts — fast, reliable Docker builds Use BuildKit cache mounts to persist package manager caches across builds. Patterns for apt, pip, npm, Go modules, and Cargo, plus the gotchas that bite in CI.
- Docker container debugging — exec, logs, inspect, stats A runbook for debugging a misbehaving container from the host. The standard tools, the netshoot pattern for slim images, and how to diagnose without restarting.
- Expose dockerd over TLS — mutual auth for remote daemons Set up the Docker daemon to listen on a TCP port with mutual TLS, generate CA/server/client certs, and lock the API down so only authorized clients can drive it.
- Dockerfile best practices for production images How to write a Dockerfile that builds reproducibly, caches well, ships small, runs non-root, and survives upstream changes. The practices that separate prototype images from production ones.
- Multi-stage Docker builds — small images, clean separation Use multi-stage Dockerfiles to keep build dependencies out of runtime images. Patterns for compiled languages, package managers, and shared layers across services.
- docker run — the flags that matter in production A guided tour of the docker run flags you must understand before shipping anything: detach, restart, env, mount, network, user, and the rest of the production essentials.
- Docker resource limits — memory, CPU, PIDs, IO Cap what containers can consume so one workload cannot starve another. The flags, the cgroups behind them, and the operational defaults we use on every host.
- Docker contexts — operate multiple hosts from one CLI Use docker context to point your local CLI at remote daemons over SSH, switch between dev/staging/prod safely, and avoid the dreaded wrong-cluster deploy.
- Docker health checks — beyond "the process is alive" Health checks tell the orchestrator whether a container can actually serve traffic. How to write good ones, set timing, and surface the signal to load balancers and Compose.
- Docker logging drivers — json-file, journald, and remote shipping Pick the right log driver for the host and the operational model. Defaults, rotation, journald integration, and shipping to Loki, ELK, or CloudWatch.