I think this is a really strange and interesting issue.
I have a client cert authenticated docker registry set up, width the help of apache. I have put the necessary certificate files to the appropriate folders according to this article.
Docker pull/push gives this error message:
Error response from daemon: Get https://***:9443/v2/: remote error: tls: alert(116)
I think my certificate files are correct and put to the appropriate places because docker pull and push working correctly on a linux machine, and I could only reproduce this issue on a WSL system.
This command works properly and gives the image names that I have pushed from the linux machine.
curl --cacert ca.crt --key client.key --cert client.cert " https://***:9443/v2/_catalog"
I dubt that the problem is width my certificate files.
I have also tried running this command:
docker --debug --tlsverify --tlscacert /home/user/.docker/certs.d/***:9443/ca.crt --tlscert /home/user/.docker/certs.d/***:9443/client.cert --tlskey /home/user/.docker/certs.d/***:9443/client.key pull ***:9443/hello-world-test
The output was this, that I cannot understand. Of course docker daemon is running:
Using default tag: latest DEBU[0000] FIXME: Got an status-code for which error does not match any expected type!!!: -1 module=api status_code=-1 Cannot connect to the Docker daemon at tcp://localhost:2376. Is the docker daemon running?
Docker version:
- Docker version 20.10.5, build 55c4c88
docker-compose.yml
services:
apache:
image: "httpd:2.4"
ports:
- 9443:9443
links:
- registry:registry
volumes:
- /opt/docker-registry-certauth/auth:/usr/local/apache2/conf:z
- /opt/docker-registry-certauth/log:/var/log/apache:z
registry:
image: registry:2
ports:
- 127.0.0.1:5000:5000
volumes:
- /opt/docker-registry-certauth/data:/var/lib/registry:z
I would appreciate if someone could give me some advice how to overcome this issue, or does somebody have any idea what can be the problem.
