April 16, 2024

This is how you fix slow package installs from snapshot.debian.org

This is how you fix slow package installs from snapshot.debian.org

https://snapshot.debian.org is known to be extremely slow and timing out on various occasions. This usually results in broken installations or failed docker container builds.

One of the things you can do is set up a local mirror in order to speed up your package installation. However, this necessitates hosting, significant disk space, and ongoing uptime monitoring and management. You can use apt-cacher NG to do so.

In order to have our builds be reproducible and fast we’ve decided to create a fully fledged historic snapshot mirror.

Its super easy to get started and should take less than 60 seconds to get going. Simply sign up to StableBuild for FREE and start integrating it in your Dockerfile:


ARG SB_API_KEY=your-api-key
# set the date you want to be pinned
ARG APT_PIN_DATE=2023-11-10T10:40:01Z

# Configure your OS to use StableBuild as the package registry
COPY ./sb-apt.sh /opt/sb-apt.sh
RUN bash /opt/sb-apt.sh load-apt-sources ubuntu

# Install your packages as usual, this'll always install curl 7.68.0
RUN apt update && apt install -y curl


And that's it! You now have the packages exactly as how they were of 2023-11-10.

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/.

Additionally we also mirror popular repositories, the repositories we support as of now are:

Missing a repository? Email us at support@stablebuild.com and we'll add it!

Ready for more stable, predictable builds?

Sign up for StableBuild for FREE now.