We have published a small Docker-based setup for running an aptly Debian package repository. The goal is simple: provide a compact, reproducible way to host signed Debian packages without turning the setup itself into a science project.

✨ What it does
docker-aptly runs aptly inside a Debian Trixie based container and serves the published repository through aptly’s built-in HTTP server.
Repository data is stored persistently in a Docker volume, while local configuration files and the GPG keyring remain outside the image. This keeps the container disposable, while the important state stays under the operator’s control.
🔐 Signed repositories included
The setup is designed for signed repositories from the start.
A local GPG keyring is mounted into the container, and aptly uses the configured signing key when publishing repository metadata. That makes the repository usable with modern Debian client configuration through /etc/apt/keyrings and signed-by.
No ancient apt-key rituals required. We are civilized people now.
🐳 Docker Compose, but still customizable
The default Compose file is intentionally small and conservative.
Local changes can be made through docker-compose.override.yml, for example to adjust resource limits, networking, labels, or the exposed port. The Dockerfile can also be replaced locally by pointing Compose to a custom file such as Dockerfile.local.
This keeps the upstream files clean while still allowing each installation to adapt to its own environment.
🧰 Helper scripts for daily use
The repository includes small helper scripts for common tasks:
- creating the initial repository
- adding local
.debpackages - adding packages from URLs
- removing package versions
- showing repository contents
- cleaning up unused Aptly database objects
They are intentionally simple shell scripts, so they can be inspected, modified, or replaced without ceremony.
🚀 Why we built it
We wanted a lightweight Aptly setup that fits naturally into a Docker-based infrastructure: predictable, signed, easy to back up, and not overloaded with magic.
It is not meant to be a universal Debian mirror platform. It is meant to be a practical private or small public package repository that does its job quietly.
Very German, really: a small machine room with labels on the cables.
🔗 Repository
The project is available on GitHub: