docker-registry icon indicating copy to clipboard operation
docker-registry copied to clipboard

registry doesnt start

Open Perfect-Web opened this issue 9 years ago • 4 comments

When i try to run the registry it fails in the logs i get

panic: unable to configure authorization (htpasswd): open /auth/htpasswd: permission denied

how is that possible ? i do have the auth folder mounted and with the file in it ...

Perfect-Web avatar Jan 27 '16 19:01 Perfect-Web

@Perfect-Web what's your configuration? what did you type to start your registry? what's in your logs? did you read the docs?

More importantly: what version of the registry are you running?

dmp42 avatar Jan 27 '16 19:01 dmp42

my run config is

docker run -dit --restart=always --net=host -v /root/auth:/auth -e REGISTRY_HTTP_SECRET=fgbhfgy45gf6gyy -e "REGISTRY_AUTH=htpasswd" -e "REGISTRY_AUTH_HTPASSWD_REALM=Registry Realm" -e REGISTRY_AUTH_HTPASSWD_PATH=/auth/htpasswd -v /root/certs:/certs:ro -e REGISTRY_HTTP_TLS_CERTIFICATE=/certs/ssl_certificate/certificate.pem -e REGISTRY_HTTP_TLS_KEY=/certs/ssl_certificate/privatekey.pem -v /var/lib/local-registry:/srv/registry -e STANDALONE=true -e MIRROR_SOURCE=https://registry-1.docker.io -e REGISTRY_REDIS_DB=3 -e MIRROR_SOURCE_INDEX=https://index.docker.io -e STORAGE_PATH=/srv/registry -e SETTINGS_FLAVOR=local --user registry:registry --name=local-registry registry:2.2.1

yes, i read the docs

Perfect-Web avatar Jan 27 '16 20:01 Perfect-Web

Ok. The bug tracker is there: https://github.com/docker/distribution/issues

This here is the deprecated registry v1 repository, as advertised in the description.

About the permission issue:

  • can you bash into the container and copy the output of ls /auth?
  • what version of docker are you running?
  • do you use SELinux?
  • do things work without authentication?

Finally, you will probably receive faster back and forth / help on irc (#docker-distribution on freenode).

dmp42 avatar Jan 27 '16 22:01 dmp42

it works if i run as privileged

Perfect-Web avatar Jan 28 '16 07:01 Perfect-Web