What is B19?
A big part of my portfolio consists of so-called b19-style images.
(b19 means nothing—you just can't get a proper namespace these days.)
It started as an internal effort for my personal and commercial projects, but ended up as a set of conventions unified across 100+ various images (both wrappers and originals). I wanted every container to behave in a predictable way, agnostic of the tech stack, whether it's a source-based or upstream-based project.
I'm not urging anyone to adopt this directly yet—I need some time in public to polish everything—but if you're tasked with a similar unification job or manage a fleet, feel free to steal the conventions.
The conventions are anchored in B19/Ubuntu and flow organically into all downstream projects.
The conventions are unopinionated (though the defaults can be).
What's inside?
Basic container decency
- Follows 12-factor app guidelines
- Reasonable, secure, and safe defaults with minimal user input required
- Images should be immutable; all state lives in volumes
- Support for XDG and other industry standards
- Proper telemetry everywhere
- File operations use locks, always keeping concurrency in mind
The Dockerfile orchestrates
- No shell sagas
- No mile-long
RUNcommands—oneRUNper stage - Minimal layers
Switches, toggles, handles
B19-style images expose switches for all kinds of behavior: there's no such thing as "too many switches." Where possible, switches are set via environment variables (relying on various mounts and binds is messy).
Configuration files are generated via Jinja2 templates driven by environment variables.
Everything is .d
Numbered hooks everywhere. Everything can be extended or overridden via simple drop-in shell scripts in downstream projects. Hooks can be inherited:
- Build is
build.d - Healthcheck is
healthcheck.d - Entrypoint is
entrypoint.d
Designed with off-grid in mind
- Do not assume connectivity is guaranteed
- Do not assume fast or stable connectivity
- Timeouts, backoffs, and retries everywhere
In other words, a b19 distribution comes with all the things you would end up adding to an official image anyway—right out of the box.