9

While trying to pull Windows images from a Private Docker Registry, I'm getting the following error

x509: certificate signed by unknown authority

I've installed the proper certificate and I can pull Linux images without any issue, but for some reason I'm unable to pull Windows ones.

My co-workers don't have this problem.

Any ideas on this one?

eduherminio
  • 1,514
  • 1
  • 15
  • 31
  • 3
    Possible duplicate of [Docker Private Registry: x509: certificate signed by unknown authority](https://stackoverflow.com/questions/39177630/docker-private-registry-x509-certificate-signed-by-unknown-authority) – Akshay barahate Apr 25 '19 at 13:04

2 Answers2

18

To add an insecure docker registry, add the file /etc/docker/daemon.json (in Linux) with the following content:

{
    "insecure-registries" : [ "your.registry.host:5000" ]
}

and then you need to restart docker.

In case of Windows the file is at the following path: C:\ProgramData\docker\config\daemon.json

Nicola Ben
  • 10,615
  • 8
  • 41
  • 65
  • Sorry, I forgot to specify I'm pulling images from a Windows machine. – eduherminio Jul 10 '18 at 10:59
  • However, adding it as an insecure docker registry through Windows Docker settings made it work, **although that step isn't needed to download Linux containers**. Please edit the answer to include Windows solution and I'll accept it – eduherminio Jul 10 '18 at 11:09
6

In windows you can find that file in

C:\Program Files\Docker\Docker\resources\windows-daemon-options.json

Make the suggested changes by Nicola Ben and then restart the docker.

Sudip Ghosh
  • 281
  • 4
  • 7