I have a simple Docker Registry running on a remote VM with Basic Auth set up for authentication. Before I started running the registry, I issued the following command (which I just shamelessly copy-and-pasted from those docs):
docker run --entrypoint htpasswd registry:2 -Bbn myuser 12345passwd > auth/htpasswd
This produced an auth/htpasswd file that contains the myuser entry and some kind of encrypted/encoded signature of the password I provided above. So this is obviously the file that the Registry will use for authenticating users.
Some concerns:
- How do I add new users to this file? Do I have to restart the registry container for the changes to take effect (I would hope not!)?
- How do I revoke users from this file, just a simple text edit? Again, what needs to happen for the changes to take effect?
- Is there a way to enforce authorization/roles (read/write access) here? I would hope that the registry allows for more than just one universal "you have unbridled access" role! Ideally I'd like to have fine grained access control over which users have read/write access to which containers/repos.