Docker Community Forums

Share and learn in the Docker community.

Authenticated Private Registry


(Sdsi) #1

I have setup a private registry following the instructions at: https://docs.docker.com/registry/deploying/ and everything worked wonderfully until I tried to use basic authentication, again following the instructions. I added the:

-v pwd/auth:/auth
-e “REGISTRY_AUTH=htpasswd”
-e “REGISTRY_AUTH_HTPASSWD_REALM=Registry Realm” \

to my run command and now the container is continually restarting. I looked the logfile which produced voluminous output, but the one line I found of interest was:

panic: unable to configure authorization (htpasswd): “path” must be set for htpasswd access controller

unfortunately I’m not sure exactly what it means. Where/how to set the “path”? Am I following an outdated set of instructions? I see other articles talking about the new token authorization, but no clear how to. I read that clients should contact the registry first and get an “HTTP/1.1 401 Unauthorized” response but when I try that using the command:

curl -v https://domain.net:5000/v2 -k -IL

I get: “HTTP/1.1 200 OK”. I’m not sure what to do next. Any help would be greatly appreciated.

Regards,

Daryl Williams


(Blugri) #2

Hello,

I just had the same problem. Browsing these forums I found the following solution:

Best Regards,
Tom