mother-of-all-self-hosting / ansible-role-docker-registry

An Ansible role for installing the Docker Registry container image distribution software
GNU Affero General Public License v3.0
0 stars 0 forks source link

Add basic authentication & option to make a private registry or completely local limitation #1

Open PuffPastry opened 2 weeks ago

PuffPastry commented 2 weeks ago

Hi,

I've been wondering why there is no Option to make this a private Docker registry? It appears to be a trivial issue that could easily be configured in the Docker Container that starts the registry. Is there a specific reason not to do so? Another way to solve the private requirement is to make it only available within the localhost environment. It would be amazing to solve this usecase within the MASH playbook.

I'm only starting to understand how the playbook organizes its services in systemd and traefik, maybe I can help, though it feels a little beyond my skill set.

Kind regards

spantaleev commented 2 weeks ago

From what I remember authentication for Docker registries is a bit more involved than just slapping Basic Auth in front.

PuffPastry commented 2 weeks ago

I've found Baeldung as well as DigitalOcean using the htpasswd utility. The first is containerizing this even, so there is no need to install anything on the host. it May be necessary to modify the dockerfile with the env variables, not sure if another service makes use of this utility as well. The first link also makes the registry available to the local docker instance without exposing it at all. However I do not understand the traefik config, is there a way to expose the registry localy and enable it for the Docker instance?

Thanks for your help