Posts

Docker Mailserver Healthcheck: 7 Proven Tests in v16

Since docker-mailserver v16.0.0 the image ships a docker mailserver healthcheck out of the box: a script called dms-healthcheck and a HEALTHCHECK --start-period=30s CMD dms-healthcheck line in the Dockerfile. The script checks that every supervisor service your configuration enables (Postfix, Dovecot, cron, rsyslog, OpenDKIM, Rspamd and so on) is RUNNING . On Docker the container then shows (healthy) or (unhealthy) with no extra configuration. On podman the image healthcheck is not used at all, so you have to add --health-cmd dms-healthcheck yourself. Every example below was tested on 2026-10-22 with mailserver/docker-mailserver:16.0.1 and :15.1.0 on Docker Engine 29.9.1 (the official docker:29.9.1-dind image) with Docker Compose v5.6.0, and with ghcr.io/docker-mailserver/docker-mailserver:16.0.1 on rootless podman 5.8.9. Rspamd, OpenDKIM, OpenDMARC, Amavis, ClamAV, Fail2Ban and Postgrey were disabled to keep the lab small. All output is copied from the lab. Contents What ...

WireGuard Docker: 7 Easy Steps and 4 Mistakes to Avoid

Image
The quickest WireGuard Docker setup is the lscr.io/linuxserver/wireguard image with a short compose.yaml : set PEERS and SERVERURL , publish UDP port 51820, add the NET_ADMIN capability and the src_valid_mark sysctl, then run docker compose up -d . The container generates the server config and one ready-to-import client config (plus QR code) per peer. This guide shows the whole setup with real output, a working client, and the four mistakes that leave you with a tunnel that never connects. Tested on 2026-10-23 on a Debian 12 KVM virtual machine (kernel 6.1.0-47-amd64) with Docker Engine 29.9.2 and Docker Compose v5.6.1, using image tag 1.0.20260223-r0-ls127 , the newest release that day. A second container on the same VM played the role of a remote laptop and connected to the VM's IP 192.168.121.137. Private and preshared keys are shortened in the output below; everything else is copied from the lab. Contents What you need for WireGuard Docker Step 1: compose.yaml for the W...

Compile Linux Kernel: 9 Easy Steps and 5 Errors Fixed

Image
To compile Linux kernel source on Debian or Ubuntu: install build-essential flex bison bc libssl-dev libelf-dev , download and verify the tarball from kernel.org, copy your running config with cp /boot/config-$(uname -r) .config , run make olddefconfig , build with make -j$(nproc) , then sudo make modules_install and sudo make install and reboot. This guide walks through every step with real output, including the four build errors you get when a package is missing and the certificate error that stops most Ubuntu builds. Every command used to compile Linux kernel 7.2.12 below was run on 2026-10-23 in a Debian 12 (bookworm) KVM virtual machine with 12 vCPUs and 5 GiB RAM, gcc 12.2.0 and binutils 2.40, building Linux 7.2.12, the latest stable release on kernel.org that day. The VM started on the distro kernel 6.1.0-47-amd64. All output is copied from two lab runs. Contents What you need before you compile Linux kernel source Step 1: download and verify the source before you compile ...

Bash Yes No Prompt: 7 Proven Patterns and 5 Mistakes

Image
A bash yes no prompt is a read -r -p "Question? [y/N] " ans followed by a case on the answer. The short version that most tutorials show works for a quick test, but it treats "yolo" as yes, loops forever when there is no terminal and silently skips the question when the script is piped. This guide shows a confirm function that handles all of that, plus Yes/No/Cancel, single-key answers, timeouts, select menus and unattended runs with -y . Every example was run on 2026-10-23 in a debian:trixie container with GNU bash 5.2.37 and dash as /bin/sh . The answers were typed on a real pseudo-terminal (util-linux script ), so the output below is exactly what a user sees at each bash yes no prompt, including the typed answer. Contents The classic bash yes no prompt and its problems A reusable bash yes no prompt function with a default Bash yes no prompt with Cancel in a loop Single key, timeout and select menu Bash yes no prompt in pipes, cron and CI POSIX sh version ...

docker ps --filter annotation: 9 Easy Examples and Errors

Image
Docker Engine 29.8.0 added an annotation filter to the container list. Run docker ps --filter annotation=KEY to list containers that carry an annotation key, or docker ps --filter annotation=KEY=VALUE to match the key and the exact value. Older engines (29.7.x and before) store annotations set with docker run --annotation , but answer the same filter with Error response from daemon: invalid filter 'annotation' . Every example below was tested on 2026-10-20 with the official images docker:29.9.1-dind (API 1.56) and docker:29.7.2-dind (API 1.55), each running in a rootless podman container. All output is copied from that lab; nothing is shortened except long container IDs. Contents What changed in Docker 29.8.0 Annotations vs labels docker ps --filter annotation: key and key=value Exact match only: no wildcards, case-sensitive Empty values Combining docker ps --filter annotation with other filters The label filter does not see annotations Use the filter with stop, inspec...

Prometheus Unix Socket Scraping (3.15): 6 Easy Tests, Errors

Image
Prometheus 3.15.0 can scrape a target over a Unix domain socket. Set the special label __unix_socket__ to the socket path, either in static_configs labels or with relabel_configs , and Prometheus connects to that file instead of a host and port. A Prometheus Unix socket scrape lets you monitor an exporter that has no TCP port at all. Older versions accept the same config file without error but ignore the label and try to resolve the target name with DNS. Every Prometheus Unix socket example below was tested on 2026-10-19 with the official images prom/prometheus:v3.15.0 and v3.13.4 , node_exporter v1.12.1 and socat 1.8.0.3 in rootless podman containers. All output is copied from the lab. Contents What changed in Prometheus 3.15.0 Prometheus Unix socket lab: an exporter without a network Prometheus Unix socket scrape with static_configs Same file on Prometheus 3.13.4 Many sockets with file_sd and relabel_configs Expose your own app metrics on a Unix socket Prometheus Unix socket e...