It’s a super-compact container with the sole purpose of responding with HTTP 404.
And it’s written in Rust and async-std
.
It mainly exists because I wanted a tiny-tiny performant default back-end for my HAProxy Ingress Kubernetes deployments.
The usual default k8s.gcr.io/defaultbackend-amd64
does not fit the bill quite well
to my taste. Especially when its arm64
variant gives you a platform mismatch error,
declaring the image’s platform is linux/amd64
.
(At least, it has been doing it at the moment of writing this. Who knows why—it’s four years old.)
Also, there may be a room or a requirement for customization or extra configurability.
The container image is available as docker.io/aeron/404
and
ghcr.io/Aeron/404
. You can use both interchangeably.
docker pull docker.io/aeron/404
# …or…
docker pull ghcr.io/aeron/404
Running a container is pretty straightforward:
docker -d --restart unless-stopped --name http-404 \
--user=65534 \
-p 80/8080:tcp \
docker.io/aeron/404
By default, the containerized app listens on the 0.0.0.0:8080
address.
However, you can also provide the PORT
environment variable with a desired port
number value. Just like so:
docker -d --restart unless-stopped --name http-404 \
--user=65534 \
-e PORT=1080 \
-p 80/1080:tcp \
docker.io/aeron/404
Don’t forget about the unprivileged user trick. The container itself won’t enforce any specific UID.