Skip to main content

Docker

Browse all articles, tutorials, and guides about Docker

45posts

Guides

Posts

Linux
|24 min read

cgroup v2 memory.high Throttles, memory.max Kills: Measured on a Host Without Swap

We ran one allocating workload under memory.max, memory.high and both on a Linux 6.8 host with no swap. memory.max killed it in under half a second. memory.high did not kill it: new allocations waited, once per 64-page batch at best and once per page next to a busy neighbour on the same CPU. Here are the numbers, the kernel formula behind them, and what systemd, Docker and Kubernetes write.

Security
|6 min read

Alpine OpenSSH Password Bypass (CVE-2026-123158): Check and Fix

Alpine sshd without PAM could let an attacker into accounts that have no password. Check one host or all your containers, then upgrade and restart sshd.

Security
|13 min read

eMudhra CA Compromise: Two Roots to Remove, and Dropping Comodo AAA Broke 1 of 16,125 Chains

Browsers blocked the compromised eMudhra TLS intermediates in hours, but images and runtimes read their own trust stores. We tested 34 stores, real curl, Python, Node.js and Go clients, and the chains that the top 20,000 sites send. Debian had to remove two roots because of a Sectigo cross-sign. Removing Comodo AAA broke 1 of 16,125 chains in our OpenSSL test.

Docker
|16 min read

Docker Build Cache on Ephemeral CI Runners: inline, registry and local, Measured

A fresh CI runner starts with no BuildKit cache. We rebuilt a real multi-stage Node service on a new builder every time, with no cache, inline, registry min and max, and a local cache directory, and measured cold builds, a one-line change, a dependency bump, the export cost and the cache size.

CI/CD
|17 min read

How Much Memory Does a CI Build Need? Five Real Builds at 2, 4 and 8 GB

We ran five real open-source builds inside 2, 4 and 8 GB memory limits. Four fit in 2 GB. The cgroup counter overstated most of them, and the one that failed was a Vite build that also runs a full type check. Every script is in the post.

Linux
|17 min read

Node.js October 2026 Security Release: Finding Every Node You Actually Run

Node.js 22.23.4, 24.22.1 and 26.12.1 fix a Brotli decoder bug that the project says permits remote code execution, plus TLS and DNS bugs. The version bump is one line. pm2 entries, the pm2 daemon, systemd units, cron jobs and containers each keep their own Node, so here is how to find every one and prove it moved.

Linux
|19 min read

PHP2Shell: How to Check That Every PHP You Run Is Actually Patched

PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35 fix two critical remote code execution bugs. Installing the update is the easy part. A patched Ubuntu PHP still says 8.3.6, running workers keep the old code, and 4.4 hours after the release 8 of 39 popular images still shipped a vulnerable PHP. Here is how to find the PHP you run and prove it is fixed.

Docker
|10 min read

Docker Desktop Switched New Containers to the local Log Driver. We Measured What That Changes

Docker Desktop 4.94 made local the default log driver for new Linux containers, while Docker Engine on your servers still uses json-file with no rotation. We wrote the same 500,000 lines through both. local kept every line in 24 MB where json-file used 84 MB. A file-tailing collector read none of them.

Linux
|11 min read

CVE-2026-80521: The Ubuntu Container Escape Is Not Just an Ubuntu Problem

A public exploit breaks out of default Docker and Kubernetes containers through a bug in the AF_UNIX garbage collector, and Ubuntu 24.04 and 26.04 still have no kernel fix. The same code sits in the 6.1 and 6.6 LTS kernels, where upstream has no fix either. Here is how to check any node in one command, and what to do while you wait for a patch.

Kubernetes
|12 min read

containerd 1.7 Reaches End of Life: What Breaks on 2.x

We ran containerd 1.7.36, 2.3.6 and 2.4.1 against the same data and an old node config. The config still loaded and the mirrors still worked. What broke was pulling schema 1 images, and it stays hidden until a node has to pull one.

DevOps
|10 min read

Linux, Git, Docker: Why That Order Matters

Every DevOps roadmap lists the same tools. Almost none of them explain why the order is not arbitrary, or why learning Docker first makes containers feel like magic. Three steps, each one runnable in a terminal, each one making the next one obvious.

DevOps
|11 min read

Go Is Not Just for CLIs. It Runs the Cloud Native Control Plane

Docker, Kubernetes, etcd, Terraform, Vault, Prometheus, CoreDNS, Caddy, MinIO, CockroachDB: we pulled the real language breakdown of 20 infrastructure projects from GitHub, explain why Go keeps winning the control plane, list where it does not, and build a static cross-compiled HTTP server to show the reason in under 6 MB.

Docker
|16 min read

Why Your Base Image Has 1,684 CVEs

I inventoried 17 base images straight from the registry and counted every advisory against the exact package versions inside. The totals are larger than you expect, one package produces most of them, and the runtime you actually run is not in the count at all.

CI/CD
|13 min read

What Does One Merge Actually Cost You in CI?

Wall-clock time and machine minutes are different numbers, and most teams track only one. Here is how to get both from your own repo.

Docker
|9 min read

Stop Compiling Postgres Extensions in Your Dockerfile: How pglayers Works

Adding pgvector or PostGIS to a Postgres image usually means apt-get, build tools, and a fat, slow image. pglayers ships each extension as a scratch Docker layer you COPY in. Here is how it works and when to use it.

Security
|10 min read

Your Container Is Not a Security Boundary: GhostLock (CVE-2026-43499)

A 15-year-old Linux kernel bug just got a public exploit that breaks out of containers and hands any local user root on the host. GhostLock is a reminder that the container is not your security boundary, the shared kernel is. Here is what actually shrinks the blast radius.

Docker
|19 min read

How Docker Really Works, From docker run to the Kernel

You type docker run and a container appears. Follow the CLI, dockerd, containerd and runc down to the kernel, with the commands to watch each step. Then get clear answers on image vs container, docker run vs start, containers vs VMs, the performance cost, and when Compose is enough.

Docker
|8 min read

The Docker AuthZ Bypass Is Back: CVE-2026-34040

CVE-2026-34040 lets a crafted API request slip past Docker authorization plugins, and it is an incomplete fix of the 2024 maximum-severity bug. Here is how the bypass works, who is exposed, and how to close it.

DevOps
|14 min read

Coolify: Self-Hosted PaaS on DigitalOcean - Deploy Apps Without Vendor Lock-In

Set up Coolify on a DigitalOcean droplet and get your own Vercel-like platform for deploying Next.js apps, databases, and more - with auto SSL, GitHub auto-deploy, and no per-seat pricing.

Docker
|12 min read

5 Advanced Docker Features Worth Knowing

Go beyond Docker basics with BuildKit, multi-stage builds, health checks, init processes, and build secrets. Learn practical techniques that improve security, performance, and reliability.

DevOps
|14 min read

GitOps: Deploy Docker Containers with GitHub Actions and ArgoCD

Learn how to implement a modern GitOps workflow for Docker deployments. This guide covers building images with GitHub Actions, pushing to container registries, and automated deployments with ArgoCD.

Docker
|12 min read

Docker Image Optimization: Best Practices for Smaller, Faster Images

Learn proven strategies to optimize Docker images: multi-stage builds, layer caching, base image selection, and security hardening. Reduce image size by up to 90% while improving build times and security.

DevOps
|12 min read

Deployment Strategies: Blue-Green vs Canary vs Rolling

Blue-green, canary and rolling deployments side by side: how each ships a release, how fast it rolls back, what it costs, and when to use which one.

DevOps
|12 min read

A Day in the Life of a DevOps Engineer

Follow a DevOps engineer through a typical day - from morning deployments to midnight hotfixes. Real challenges, real solutions, and real impact on business operations.

Docker
|7 min read

COPY with Docker but with Exclusion

Learn how to use the COPY instruction in Docker with exclusion patterns to optimize your Docker builds.

Docker
|6 min read

How to Set Image Name in Dockerfile

Learn how to set and manage image names effectively in Dockerfiles for streamlined workflows. This guide covers the steps to build Docker images with specific names and tags.

Docker
|18 min read

Forward Host Port to Docker Container

Publish container ports with -p, bind them to localhost, add a port to a container that already runs, understand ports vs expose in Compose, connect to Postgres in a container, find a container IP, and connect containers from different Compose projects.

Docker
|16 min read

How to Access a Docker Container's Shell, Run Commands and Copy Files

Open a shell with docker exec, run one-off commands, get root without sudo, add bash or ps to a slim image, edit and copy files with docker cp, look inside an image that has no shell, and debug a stopped container.

Docker
|7 min read

docker compose: Always Recreate Containers from Fresh Images

Run docker compose up -d --pull always --build --force-recreate to pull newer images, rebuild local ones and replace containers instead of reusing them.

Docker
|12 min read

How to Use Environment Variables in Docker and Docker Compose

Pass environment variables with docker run -e and --env-file, set them in Compose with environment, env_file and .env files, learn which value wins, use defaults and required variables, set ENV and PATH in a Dockerfile, and keep secrets out of all of them.

Docker
|5 min read

Docker: Connect to the Host's localhost from a Container

Use host.docker.internal, not localhost. Docker Desktop resolves it; on Linux add --add-host=host.docker.internal:host-gateway or use --network host.

Docker
|7 min read

How to Get the IP Address of the Docker Host from Inside a Docker Container

Need your container to talk to the Docker host? Learn practical ways to discover the host's IP address from inside a container, with examples for Linux, macOS, and Windows.

Docker
|7 min read

How to List Volumes in Docker Containers

Learn multiple ways to view Docker volumes attached to containers, inspect volume mounts, find volume locations on the host, and understand volume usage across your Docker environment.

Docker
|7 min read

How to Use Multiple Build Arguments in Docker Build

Learn how to pass multiple build-time variables to Docker builds using --build-arg, set default values in Dockerfiles, and use build arguments for environment-specific configurations.

Docker
|14 min read

Fix Docker 'Cannot Connect to the Docker Daemon' and 'Permission Denied' Errors

Fix 'Cannot connect to the Docker daemon at unix:///var/run/docker.sock', permission denied on the Docker socket and on volumes, and 'denied: requested access to the resource is denied' on docker push. Learn why the docker group equals root, and how to harden a Docker host.

Docker
|6 min read

How to Fix Docker "The input device is not a TTY" Error

Learn what causes the Docker TTY error and discover multiple solutions to fix it, from command-line flags to proper terminal configuration for interactive containers.

Docker
|16 min read

How to Rebuild, Restart and Upgrade a Docker Compose Container

restart, up -d, up --build and --force-recreate each apply a different kind of change, and only one of them rebuilds your image. Tested on Compose 5.6: which command picks up which change, how to start only some services, wait for a healthy database, upgrade without losing data, get a shell in a crashed service, and what changed from docker-compose v1.

Docker
|16 min read

Difference Between RUN, CMD and ENTRYPOINT in a Dockerfile

RUN executes at build time, CMD sets the default command, and ENTRYPOINT sets the program that always runs. See how the three combine, why a container exits at once, how to run cron, when ADD beats COPY, and how comments work in a Dockerfile.

Docker
|8 min read

How to Access Host Port from Docker Container

Learn how to access a host machine's port from a Docker container using network configurations and best practices.

Docker
|13 min read

How to Force a Clean Docker Build and Fix Common Build Errors

Rebuild without the cache, fix "docker build requires 1 argument", use files from outside the build context, look inside a build that failed, and give a build SSH keys or secrets without baking them into the image.

Docker
|14 min read

How to Keep Docker Data When a Container Exits: Volumes and Bind Mounts

Data in a container goes away with the container. Learn when that happens, how named volumes and bind mounts keep data, how to add a volume to an existing container, where database images keep their files, and how to back up and remove volumes safely.

Docker
|5 min read

Docker: How to Change Repository Name or Rename an Image

Learn how to rename a Docker image or change its repository name using simple Docker CLI commands. This guide covers real-world scenarios and best practices.

Docker
|13 min read

How to List and Remove Docker Containers and Images

List running and stopped containers, fix "name is already in use", remove old containers and images safely, delete every local image, find where Docker stores its data, and free disk space when Docker fills the disk.