docker-compose pull results in x509: certificate signed by unknown authority

Viewed 27168

I'm hitting the following error when trying to pull the elastcisearch images from dockerhub.

docker-compose pull
Pulling elasticsearch (elasticsearch:2.2.0)...
Pulling repository docker.io/library/elasticsearch
ERROR: Error while pulling image: Get https://index.docker.io/v1/repositories/library/elasticsearch/images: x509: certificate signed by unknown authority
Failed to run with docker-compose

My company has an Intermediate Root CA that I suspect is causing the problem. Any ideas how I should configure Docker to use the company Root CA?

4 Answers

this might happen on local or user registries that might not have root CA signed certificates (these might be self singed). You can use the following steps use these registries:

  1. sudo systemctl edit docker.service

  2. add the registry like this:

[Service]
ExecStart=
ExecStart=/usr/bin/dockerd <some params...> --insecure-registry <your registry here> <other params...>
  1. Save the file.
  2. Reload the configuration with sudo systemctl daemon-reload
  3. Restart Docker with sudo systemctl restart docker.service
Related