I have an ordinary ubuntu image with no dockerd
installed, only the docker command line client and curl
are installed such that I can query a docker registry. I have set up tls security. The following works as expected.
curl https://myregistry/v2/_catalog # gets the infocurl http://myregistry/v2/_catalog # fails as expected
So I am confident that docker can pull from the registry via https. Unfortunately and in contradiction to the documentation, my docker client only tries http, which of course fails.
docker pull myregistry/myimageUsing default tag: latestError response from daemon: Client sent an HTTP request to an HTTPS server.
The Ubuntu image and the registry/2 are the newest available versions as of EOY 2024.
My question is how to tell docker pull
to use https instead of http? All posts I found so far describe the opposite problem where docker talks https to an http registry.
I assume that my certificates are correct, because otherwise curl
would have failed with both http and https. The certificates and keys are in /etc/docker/certs.d/registry
i.e. (ca.crt
, myregistry.pem
and myregistry.key
)