Beginning with version 3.17, Nexus Repository Manager supports APT (Advanced Package Tool) repositories. APT is a set of tools used to search, install, and manage packages on Debian, Ubuntu, and similar Linux distributions. With this new release, you can now host your own local APT repos. Developers benefit from no longer having to rely on connecting externally to a public repository every time an often-used package is needed.
In the case of Debian-based Docker containers, the ability to locally cache Debian packages from public repositories can save copious amounts of time when rebuilding your containers. This can do wonders especially for containers built frequently in a CI pipeline and for the more traditional use-case of provisioning virtual machines.
In this simple bare-bones Dockerfile, we download the latest Ubuntu image and run it:
RUN apt-get update && apt-get -y dist-upgrade
The Ubuntu image is pulling the APT packages from the repository listed in our sources.list file which, in this case, points to the public Ubuntu repository. (For more benefits of caching your necessary build components, you can use Repository Manager as a local Docker registry.)
It’s a waste of time to go out to the internet to download a large OS package. Imagine the time being spent on Docker jobs where each build relies on reaching out externally to download a large OS image.
Why worry about the nature of network issues — latency, bandwidth, connectivity, etc. — when you can avoid all of that and store these OS packages locally in Nexus Repository Manager? If a developer or build has already downloaded the needed package from the public repository, all can subsequently rely on the package cache within their organization’s network.