Dockerfile and ADD from an URL with self-signed ceritificate

I am attempting do this in the Dockerfile
ADD https://somedomain/somefile /usr/local/bin/somefile

And I get the error “x509: certificate signed by unknown authority” as the URL uses a self signed certificate.

Any hints of how to make Docker accept this? (I already have added the certs under /etc/docker/certs.d/somedomain and reloaded/restarted docker daemon)

I’d like to add that I’m also very interested in finding out if there’s an equivalent to /etc/docker/certs.d for self-signed certificates.

@vrenjith I’m not sure it’s supported at all. I’d just do a curl or wget using the corresponding cert flags with the RUN instruction.

@richardney What do you mean?

We have an internal docker registry that uses a self-signed certificate. When I attempt to run docker pull I get the x509 error.

Administrators-MacBook-Pro:quickstart rney$ docker pull bosdocker-reg.wwproducts.aspect.com:5000/message-distributor:mmd-dev
Error response from daemon: Get https://bosdocker-reg.wwproducts.aspect.com:5000/v1/_ping: x509: certificate signed by unknown authority

Our normal workaround on linux is to put a copy of the certificate in /etc/docker/certs.d

@richardney Are you on boot2docker? Did you try https://github.com/boot2docker/boot2docker#installing-secure-registry-certificates ?

I’m actually using the Docker for Mac beta. The forums brought this topic up when I was posting my question. Just noticed this topic is in a different forum.