You are (still) software engineers, so COMPILE YOUR SOFTWARES
Five years ago I told you to compile your softwares for performance. Today the performance argument still holds, but the real reason is security: supply chain attacks, bloated generic images, and CVE noise. And the old excuse, maintenance cost, is dead. AI killed it.
Five years ago, I wrote an article called You are software engineers, so COMPILE YOUR SOFTWARE. The short version: I claimed on a conference stage that prebuilt Docker images are slow because they ship binaries compiled for the lowest common denominator CPU, people booed, my ego got hurt, and I spent the following weeks benchmarking six flavors of Redis with Celery and Warp10 to prove I was right.

The (in)famous picture. Yes, it is still my slide.
The results were fun. The stock Docker images were up to 142.92% slower than the stock Arch package. Our mimalloc build was 4.42% faster than stock. The Zig build, included as a joke, almost matched GCC. And the conclusion was simple: compile your softwares.
Five years later, people still ask me if we really do this. If we really maintain our own builds of the boring infrastructure software everybody else pulls from Docker Hub without reading.
Yes. We still do. We do it more than ever.
But the reason has changed. In 2021 it was about performance. In 2026, performance is the bonus. The main course is security.

us, still compiling our softwares, five years later
The performance argument did not age. Not one bit.

this take, five years in the barrel
Quick refresher on why generic binaries are slow: when a distro or Docker Hub builds Redis, PostgreSQL or NGINX, the binary must run on every x86-64 machine on earth, including that Xeon from 2013. So it gets compiled with -march=x86-64 -mtune=generic. No AVX-512. No modern instruction sets. No tuning for the CPU you actually paid for.
Since 2021, the hardware zoo has gotten wilder:
- ARM is everywhere now. Your laptop, your CI runner, half the cloud catalog.
- AMD EPYC generations pile up instruction sets like collectibles.
- Even inside one cloud provider, two instances of the same “size” can be different CPU generations.
And the generic binaries? Still -march=x86-64 -mtune=generic. Still built on old toolchains. Still shipping libraries from another geological era. The delta we measured in 2021 did not shrink. On modern CPUs, for CPU-bound workloads, it grew: more instruction sets to ignore, more cores to starve, more silicon you paid for and never use.
So yes, we still build with -O3, -march=native per target, and mimalloc where it wins. We still run make test before anything goes near production, like civilized people.
💡Generic binaries are compiled for a CPU that does not exist: the average of every machine on earth. Your server is not average. Your binary should not be either.
But to be fair, performance is the comfortable part of the story. A few percent here, a lot of percent there. What changed is that the rest of the argument, the one I used to throw in as a side note, became the main argument.
The side note became the headline: security
In the 2021 conclusion, I wrote that compiling your software makes it “more secure (by removing the mail gateway of NGiNX for example)”. One sentence. A parenthesis, almost.

That parenthesis aged like wine.
The supply chain is a crime scene
March 2024. A Microsoft engineer named Andres Freund notices something odd: SSH logins taking 500ms longer than they should. He digs. He finds a backdoor in xz Utils, a compression library present in basically every Linux system on the planet. CVE-2024-3094. A patient, multi-year operation to backdoor the world’s SSH servers, through a build system file, in a library nobody thinks about.
Read that story again, because the details matter: the biggest supply chain attack of the decade was caught because someone was paying attention to performance. A 500ms latency regression. The performance nerds and the security nerds are the same nerds. They just use different words.
And xz is the one we caught.
But Loïc, we scan our images! We have a tool!
Wonderful. Your scanner reads a manifest and compares version strings against a CVE database. Very useful. What it does not tell you: why on earth your Redis container ships a shell, a package manager, and a full-text search engine.
Attack surface: you cannot exploit what is not there
This is not theory. Here is the official nginx image, nginx:latest, pulled the day I wrote this. Full output, nothing trimmed, one flag per line so you can actually read it:
$ docker run --rm nginx:latest nginx -V
nginx version: nginx/1.31.8
built by gcc 14.2.0 (Debian 14.2.0-19)
built with OpenSSL 3.5.7 9 Jun 2026
TLS SNI support enabled
configure arguments:
--prefix=/etc/nginx
--sbin-path=/usr/sbin/nginx
--modules-path=/usr/lib/nginx/modules
--conf-path=/etc/nginx/nginx.conf
--error-log-path=/var/log/nginx/error.log
--http-log-path=/var/log/nginx/access.log
--pid-path=/run/nginx.pid
--lock-path=/run/nginx.lock
--http-client-body-temp-path=/var/cache/nginx/client_temp
--http-proxy-temp-path=/var/cache/nginx/proxy_temp
--http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp
--http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp
--http-scgi-temp-path=/var/cache/nginx/scgi_temp
--user=nginx
--group=nginx
--with-compat
--with-control-api
--with-file-aio
--with-threads
--with-http_addition_module
--with-http_auth_request_module
--with-http_dav_module
--with-http_flv_module
--with-http_gunzip_module
--with-http_gzip_static_module
--with-http_json_module
--with-http_mp4_module
--with-http_random_index_module
--with-http_realip_module
--with-http_secure_link_module
--with-http_slice_module
--with-http_ssl_module
--with-http_stub_status_module
--with-http_sub_module
--with-http_v2_module
--with-http_v3_module
--with-mail
--with-mail_ssl_module
--with-stream
--with-stream_realip_module
--with-stream_ssl_module
--with-stream_ssl_preread_module
--with-cc-opt='-g -O2 -ffile-prefix-map=... -fstack-protector-strong
-fstack-clash-protection -Wformat -fcf-protection -D_FORTIFY_SOURCE=2'
--with-ld-opt='-Wl,-z,relro -Wl,-z,now -Wl,--as-needed -pie'Yes, you read that right. Five years after my NGINX mail gateway joke, the official image still ships the mail proxy. Along with the FLV module, Flash video, in 2026, the MP4 streaming module, a random index generator, a slice module, and WebDAV. To be fair, the hardening flags at the bottom are the one good line in this wall. The rest is a museum of everything anyone, anywhere, might one day need.
Digging further inside the container: 152 Debian packages, sh, bash, apt, curl, and debug copies of every dynamic module. Everything an attacker needs to feel at home, thoughtfully pre-installed.
And for the performance nerds still reading, look at --with-cc-opt: -O2, and not a single -march anywhere. Generic by construction, exactly like in 2021.
The compiler is a fossil too
Look at the second line again: built by gcc 14.2.0.
GCC 14.2 was released on August 1, 2024. Since then:
- GCC 15.1, April 25, 2025. Better optimizers, C23 by default. That C23 switch broke half the C ecosystem,
boolbecame a keyword, ask rsync or ruby how their week went. But nginx builds fine with GCC 15: Fedora 42 and Alpine 3.23 both ship it compiled that way. There is no compatibility excuse. - GCC 14.3, May 22, 2025. 211 bug fixes for the 14 branch. The nginx image does not have them.
- GCC 16.1, April 30, 2026. The current series. Zen 6, AVX10.2, and, I am not making this up, Algol 68 support.
So the image tagged latest, pulled millions of times a day, is compiled by a two-year-old compiler, two major versions behind, missing even the final bugfix release of its own branch. And that branch is dead: nobody will ever fix a compiler bug in 14.2 again.
Why? Not malice. Mechanics. The official image builds on Debian stable, and Debian stable freezes its toolchain at release. The latest tag tracks the nginx version. Everything under it, compiler, libc, flags, is frozen in distro time. Fresh application, fossil foundation.
In 2021, the official Redis image shipped gcc 8.3.0 from February 2019. Two years old. In 2026, the official nginx image ships gcc 14.2.0 from August 2024. Two years old. The more things change.
And Redis, the hero of the 2021 article? I checked too:
$ docker run --rm redis:latest redis-server --version
Redis server v=8.10.3 sha=00000000:1 malloc=jemalloc-5.3.0 bits=64Same gcc 14.2.0 under the hood, same Debian freeze. jemalloc 5.3.0, released May 2022. And since Redis 8 went the “everything bundled” route, the image ships RediSearch, RedisJSON, TimeSeries and Bloom: 29 MB of .so files, not even loaded by default. Your cache now carries a full-text search engine it never asked for. What could possibly go wrong. Plus sh, bash and apt, in a cache server, for convenience.
When you compile your own build, you decide what exists, and what builds it:
- A current compiler, with current optimizations and current fixes. GCC 16 today, GCC 17 the day it lands, because our pipeline rebuilds anyway.
- No mail gateway in NGINX. We do not proxy SMTP through our web servers, call us old-fashioned.
- No FLV, no MP4, no WebDAV, no module you never loaded.
- No bundled extras sitting on disk “in case you enable them”. 29 MB of search engine is not a feature, it is a liability.
- No shell, no package manager, no curl in the final image.
- No debug builds of anything, just in case.
Every line of code you do not ship is a line of code that cannot have a CVE. Every feature you compile out is a feature nobody can weaponize against you. This is not paranoia, this is arithmetic. A generic image is built for everyone, which means it carries everyone’s features, everyone’s dependencies, and everyone’s CVEs. Including the ones for the mail gateway you never enabled.

your CVE scanner, when the image ships 400 packages instead of 40
How we do it at Kalvad in 2026

the Kalvad build machine, circa now: totally practical
Let’s get practical, because “compile your softwares” without a pipeline is just a hobby. Here is the machine.
The build pipeline
Everything starts from source, on our own hardware, in our own CI:
- Fetch the source. Signed tarballs or verified tags. Checksums pinned. If upstream does not sign releases, that is already information about the project.
- Build on Woodpecker CI. Self-hosted, on our own mini PCs, with our own registry and caches. No shared runner executing stranger’s YAML next to your build.
- Run the test suite.
make testor the project’s equivalent is a gate, not a suggestion. A build that does not pass its own tests does not ship. This rule has not moved since 2021. - Package minimal. Alpine or scratch as the runtime base. Only the binary, its config, and the strict minimum around it.
Compile with our flags. -O3, -march=native per target architecture, mimalloc where the benchmark says yes. Always --no-cache on image builds, because reproducibility beats convenience. Concretely, the Redis build still looks like this:
make -j8 MALLOC=mimalloc CFLAGS="-O3 -march=native"
make testSimple. Boring. The way builds should be.
The boring, beautiful result: we know exactly what runs in production, because we built it, from source we fetched, with flags we chose, on machines we own.
“But it is too much work!” AI killed that excuse.
Let’s be clear: in 2021, the objection was fair.
Maintaining your own builds means tracking releases, reading changelogs, noticing that configure flag got renamed, discovering that the test suite needs a new dependency, and doing this for every piece of infrastructure software you run. That used to cost senior engineering time. Real, expensive, grumpy-on-monday-morning senior time.
That objection is dead. AI killed it, buried it, and sent flowers.
What the machine does for us now
Today, the grind is handled by agents, wired into our pipeline:
- Watch releases. Every project we build gets tracked. New tag, new tarball, it gets noticed the same day.
- Read changelogs. All of them. Including the boring ones. Especially the boring ones.
- Diff the build system. Configure flags renamed, defaults changed, deprecated options, new mandatory dependencies: flagged before the build even runs.
- Bump, build, test. The agent updates the version, triggers the build on Woodpecker, runs the test suite, and opens a merge request with a summary a human can review in two minutes.
- Triage CVEs against reality. A CVE lands, the agent checks it against our inventory and our actual build configuration. Redis CVE in a module we compile out? Informational. CVE in the code path we ship? Rebuild, now.
A senior engineer reviews the MR, asks the questions that matter, and clicks merge. What used to be a week of toil per quarter is now a background process with a human gate.
AI did not make compilation obsolete. It made custom builds cheap. The thing that used to require a build engineering team is now an agent loop and a reviewer. You get exactly the software you want: your CPU, your flags, your features, nothing else.
This is the part people miss when they talk about AI. The superpower is not “generate code fast”. The superpower is managing exactly what you want, at a granularity that used to be reserved for Google-scale companies with build engineering teams. Per-service compiler flags. Per-CPU targets. Per-client patch levels. Feature sets trimmed to the millimeter. All of that was always possible. It was just too expensive to maintain. Now it is not.
But, and there is a but

there is a difference between reading the changelog and understanding the changelog
Do not read this as “let the AI run your builds and go to the beach”.
The agent reads changelogs so you do not have to read all of them. You still have to read the ones that matter. The agent proposes the MR. A human who understands the software approves it. The test suite gates everything, and when a build fails in a weird way, someone on the team still needs to know what -march=native actually does.
AI gives superpowers to people who understand their stack. To button-pushers, it gives the ability to break production at a speed previously reserved for state actors. We wrote a whole article about choosing your side. This is the same choice, applied to your build pipeline: own the tool, understand the tool, or become the tool’s support ticket.
What has not changed since 2021

the industry, learning nothing, on a loop
Five years, two articles, one industry that learned nothing. The fundamentals did not move:
make teststill runs. No exceptions, no “the change is trivial”, no “CI is slow today”.- Compile failures are a gift. The software that fights your build flags, fails its own tests, and requires three patches to compile is telling you something about its quality. Listen.
- Understanding is the point. The first time you compile PostgreSQL yourself, you learn what is actually inside it. That knowledge compounds. The knowledge of which Docker Hub tag to pull does not.
- Generic is for everyone. You are not everyone. Your hardware, your threat model, your workload. Your build.
Conclusion

still right, five years running
In 2021, I told you to compile your softwares because the performance numbers were embarrassing for prebuilt images. They still are.
But today, that is not why you should do it. You should do it because xz happened, and the next xz is already in progress. Because every feature you do not ship cannot be exploited. Because “we pull the official image” is not a security posture, it is an act of faith. And because the last honest objection, maintenance cost, died the day agents learned to read changelogs.
COMPILE YOUR SOFTWARES.
Still. More than ever. With a pipeline, an inventory, a test suite, and an AI intern that never sleeps and always asks for review.
And to the people we respect who were already doing this in 2021: hello CleverCloud, you were right early, as usual.
If you have a problem and no one else can help. Maybe you can hire the Kalvad-Team.
Still Shipping Generic Binaries?
We build software for the hardware it actually runs on, and we secure it by knowing exactly what is inside: custom builds, minimal images, self-hosted CI, and patch pipelines measured in minutes. We do this for fintech, government, and regulated environments where “we trust Docker Hub” is not an acceptable answer. Let’s audit your stack.