Try to use mTLS client certs with docker registry. I deployed standart registry from docker docs with port 5000. And external nginx with mTLS on port 443. Nginx check client cert and proxy traffic to registry container on port 5000. With curl it is works fine.
curl -k --key ssl/client.key --cert ssl/client.crt https://localhost/v2/ {"errors":[{"code":"UNAUTHORIZED","message":"authentication required","detail":null}]}
I put client certificates to /etc/docker/certs.d/localhost.
But i cant tell to docker login and pull from httpS://localhost. For example:
docker login --username a --password b localhost:443 Error response from daemon: login attempt to http://localhost:443/v2/ failed with status: 400 Bad Request
It makes http request, not httpS. docker pull do this too.
How i make a force https auth with docker login and force https connection with docker pull?
I tried a force protocol write:
docker login --username a --password b https://localhost:443 Error response from daemon: login attempt to **http**://localhost:443/v2/ failed with status: 400 Bad Request
Tried to add localhost to insecure registries:
`
/etc/docker/daemon.json
{“insecure-registries” : [ “localhost:443” ] }
`
Nothing help 🙁
Anton Kuzmin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.