Reputation: 29537
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:
Upvotes: 1
Views: 1379
Reputation: 1324947
You can refer to the Apache htpasswd
command (for instance htpasswd -D <username>
would remove an account)
The docker run you did was to execute that command (overriding the default command of a registry image with --entrypoint
), and add, update or remove users.
Note docker distribution (which produces docker registry 2.0) has discussions about role-based access (like issues 635):
Note that registry 2.1 will release with native basic auth, which might be sufficient. However, no role-based access control is provided. Adding ACL support is realistic with some careful thought and a PR.
Upvotes: 1