OS package registry (Ubuntu, Debian, Alpine)
Many applications and build dependencies are installed from your operating system's package repository, for example in a Dockerfile:
When you aim for reliable and stable builds this is problematic:
This will install the latest version of the package. These package registries constantly update, and the command above will install the version of
curl
that was available whenever the container was built. This makes it impossible to have deterministic builds: packages will change whenever the build cache is empty (e.g. when you add a new build server); and your developers will all have a different set of packages, depending on when they built their containers.Packages might be removed. E.g. Chromium used to be available on Ubuntu through apt, but was removed in favor of a snap version (which you can't easily install in a container).
Pinning of packages does not work, as older versions of packages are actively deleted from package registries. E.g.:
apt install -y curl=7.68.0-1ubuntu2.20
Might work today, but will fail when a new version of curl is released.
StableBuild solves all of these problems by creating a daily copy of the complete Ubuntu, Debian and Alpine Linux package registries - plus the most popular registries operated by others. You can thus pin your package list to a specific date, and this will return the exact same packages, regardless whether packages were modified or removed upstream. Example for Ubuntu:
We have daily copies going back to Sept. 6, 2023 (Ubuntu/Debian) and Dec. 17, 2023 (Alpine). You can browse the registry here: http://debmirror.stablebuild.com/.
And that's it. Your package list is now stable and reliable. 🎉
What repositories are you mirroring?
The following repositories are mirrored:
Ubuntu
Official Ubuntu package repository for Ubuntu 18.04, 20.04 and 22.04, for amd64, arm64 and armhf.
Nvidia CUDA repository for Ubuntu 18.04, 20.04 and 22.04, for amd64 and arm64.
Deadsnakes PPA (with up-to-date Python versions) for Ubuntu 18.04, 20.04 and 22.04, for amd64, arm64 and armhf.
NodeSource PPA (with up-to-date Node.js versions) for Ubuntu 18.04, 20.04 and 22.04, for amd64, arm64 and armhf.
Docker CE PPA (with the Docker community edition) for Ubuntu 18.04, 20.04 and 22.04, for amd64, arm64 and armhf.
Chromium (from the official Debian package repository) for Ubuntu 18.04, 20.04 and 22.04, for amd64 and arm64.
Debian
Official Debian package repository for Debian 10, 11 and 12, for amd64, arm64 and armhf.
NodeSource PPA (with up-to-date Node.js versions) for Debian 10, 11 and 12, for amd64, arm64 and armhf.
Alpine Linux
Official Alpine Linux package repository for Alpine 3.16, 3.17, 3.18 and 3.19, for all architectures.
You can easily configure which sources to load in the dashboard. Select your operating system in the navigation bar, and then follow the instructions in the UI.
We're happy to mirror any other (publicly available) repositories. Just email us at support@stablebuild.com and we'll add them.
How about existing artifict management tools?
Existing artifact management tools try to deal with this problem by looking at all the packages that would be installed, downloading and mirroring the corresponding .deb
or .apk
files, and then installing those files instead of using the package manager. That works, but is problematic on a few levels:
When you want to modify your package list. E.g. you have curl 7.65 in cache. Months later you want to add a new package, but it's not in the cache yet, and the current version is dependent on curl 7.69 (and old versions are removed from the registry). Now you also need to update your existing package list - which might break your application.
When you want to move architectures. You have x86 packages cached, but now your developers are switching to macOS. You don't have the aarch64 packages in cache, so need to fully update all dependencies.
Because StableBuild has the complete historic package registry this is not an issue. You just add the new package to your apt install
list and the version compatible with curl 7.65 will be fetched. And because we mirror all architectures, you can run the same command on aarch64 or armv7 - and get the same package list back for that architecture.
Application specific notes
Installing Chromium on Ubuntu
Chromium used to be available through apt on Ubuntu systems, but now throws:
StableBuild fixes this by installing the apt-compatible version of Chromium from the Debian registry. Under 'Which package repositories to include', choose "Chromium" and follow the instructions. Afterwards you can install Chromium again via apt (ran on Ubuntu 20.04):
The exact version of Chromium depends on the pin date.
For example:
2023-11-10T10:40:01Z
contains Chromium 116.2023-09-30T10:40:01Z
contains Chromium 114.
To install chromedriver, for example to run integration tests, run:
Tips & tricks
Manually changing apt sources
You don't need to use sb-apt.sh
. You can also manually update your sources.list
files. Sources lines typically look like this:
Easiest is to open sb-apt.sh
in your favourite editor, and you'll see how we add the source lines for all supported repositories.
Last updated