Local Container Registry

Due to Bitnami removing containers a local container caching system needs to be implemented to preserve containers and act as a caching mechanism.

Install researching shows that Harbor is a promising solution with Docker and Kubernetes installation paths.

@jdbarnes

Running the test instance of Harbor in a Docker container was a simple installation. Install docker, downloaded the offline GitHub release, extracted files, copied harbor.yml.tmpl to harbor.yml, made configurations, and finally installed with sudo ./install.sh --with-trivy.

After starting, login to the WebGUI. Then the first repository Docker Hub is added.

Next was creating a replication rule to clone containers. Set the appropriate filters then hit replicate. One concern is the Docker hub anonymous pull rate limit. There is a bandwidth cap which can be used to slow down the downloads.

Using the cloned container is also straightforward on the client:
sudo docker pull __REGISTRY_ADDRESS__/bitnami/postgresql:17

The pull though cache configuration was really simple, creating a project cache and enabling the setting. Then using the command:
sudo docker pull __REGISTRY_ADDRESS__/cache/__CONTAINER_NAMESPACE__

However one goal was to avoid having to rename docker pull bitnami/postgresql:17 to include the registry prefix docker pull __REGISTRY_ADDRESS__/bitnami/postgresql:17. In Docker, there doesn’t seem to be an explicit method for replacing the default call to docker.io to the local registry. This looks to be a reoccurring issue across the internet. Mentions of using registry-mirrors and editing the host file for redirecting request; the latter not being optimal.