How to run a GitLab container registry (2024)
-
I can see some old posts from 2022 that have some complicated steps to install the Docker Registry app and link GitLab to it. Is it possible to use the built-in registry by making the configuration edits here?
It seems it would just need another open port, but as I understand Cloudron apps have to pre-define the ports they're allowed to listen on, so this option would need to be built into the Cloudron app definition and I don't see it anywhere.
I'd much rather use this "set and forget" container registry approach, since it makes it easier to connect to other parts of GitLab.
-
I couldn't find a good way to do it just with GitLab so I went ahead and installed another app. I'd still like to hear if this is possible with GitLab alone.
Overall, it took about 10 minutes to set it up this way, which is better than not having repository functionality. One note is that the way the docker registry app identifies itself, the port is VERY important in how you login. Previously I was able to auth with my GitLab hosted docker repository with a URL like:
docker login registry.mydomain.com
but this didn't work at all with the Cloudron Docker Registry hosted at the same domain. I had to change to:
docker login registry.mydomain.com:443
yes - the port is apparently important!
-
-
J james marked this topic as a regular topic on
-
I'm prompted to look at this since I migrated my Gitlab to another Cloudron instance and the registry seems to be the only bit not working currently (not unexpected as I haven't changed/re-configured anything for it or migrated the Docker Registry). The Gitlab folks want to deprecate external container registries anyway so the ideal situation here would be to enable their "native" container registry. Looking at the instructions this is a non-trivial piece of work as the registry for a self compiled Gitlab instance requires another docker container to run it and a bunch of configuration. From a Cloudron perspective I think the team would have to look at:
- Do you offer the registry as an application in its own right? i.e. install it on its own sub-domain, potentially configure the appropriate Gitlab app with the details or publish the required config as an install note that you or I apply to
gitlab.yml
- Do you offer the registry as something you add-on to Gitlab (either at install time or as an option afterwards)? This probably hides complexity from you or I but there's probably more work on the packaging side to get it to work. Maybe you install it anyway as part of a standard install and leave it turned off by default ...
One other option is to introduce Harbor as that's exposed in Gitlab as a 3rd party integration. However glancing at it, it's non trivial to setup and I think girish had similar thoughts https://forum.cloudron.io/post/19194
- Do you offer the registry as an application in its own right? i.e. install it on its own sub-domain, potentially configure the appropriate Gitlab app with the details or publish the required config as an install note that you or I apply to
-
I'm prompted to look at this since I migrated my Gitlab to another Cloudron instance and the registry seems to be the only bit not working currently (not unexpected as I haven't changed/re-configured anything for it or migrated the Docker Registry). The Gitlab folks want to deprecate external container registries anyway so the ideal situation here would be to enable their "native" container registry. Looking at the instructions this is a non-trivial piece of work as the registry for a self compiled Gitlab instance requires another docker container to run it and a bunch of configuration. From a Cloudron perspective I think the team would have to look at:
- Do you offer the registry as an application in its own right? i.e. install it on its own sub-domain, potentially configure the appropriate Gitlab app with the details or publish the required config as an install note that you or I apply to
gitlab.yml
- Do you offer the registry as something you add-on to Gitlab (either at install time or as an option afterwards)? This probably hides complexity from you or I but there's probably more work on the packaging side to get it to work. Maybe you install it anyway as part of a standard install and leave it turned off by default ...
One other option is to introduce Harbor as that's exposed in Gitlab as a 3rd party integration. However glancing at it, it's non trivial to setup and I think girish had similar thoughts https://forum.cloudron.io/post/19194
@jamesgallagher there is Docker Registry on Cloudron as an app.
Cloudron Container Registry
But I don’t know about Gitlab integration
- Do you offer the registry as an application in its own right? i.e. install it on its own sub-domain, potentially configure the appropriate Gitlab app with the details or publish the required config as an install note that you or I apply to
-
@jamesgallagher there is Docker Registry on Cloudron as an app.
Cloudron Container Registry
But I don’t know about Gitlab integration
@timconsidine Yes, this is what I run today and it has worked really, really well ... integrates nicely with Gitlab. But the deprecation the Gitlab folks have in mind for 3rd party registries is a worry (https://docs.gitlab.com/administration/packages/container_registry/#use-an-external-container-registry-with-gitlab-as-an-auth-endpoint). There's talk about them doing a hard deprecation which I'm taking to mean would stop it working completely rather than just being unsupported as today