Docker : Installing Docker behind a proxy on CentOS 7 : Error while pulling image

I’m installing docker on CentOS 7 and i have this issue :

Error while pulling image: Get https://index.docker.io/v1/repositories/library/centos/images: x509: certificate signed by unknown authority

The configuration that i have:

Adding the proxy under /etc/sysconfig/docker file

http_proxy=http://login:Password!@ < mydomain > : < port >

[root@localhost ~]# journalctl -xe

i have this :

https://registry-1.docker.io/v2/: x509 certificate signed by unknown authority

So can anyone help me to find a solution for this issue???

I try to figer out a solution

So i download the certificate of the site hub.docker.com using the navigator and

i copied the certificate “docker.crt” under /etc/pki/ca-trust/source/anchors/

after that i execute “update-ca-trust extract”

I restart docker , but it’s the same issue :confused:

If someone have an idea about this , or how can i do it using another way , can help me ?

Hi,

CentOS changed their init system to systemd starting with CentOS 7, so the config files that override defaults are not in the same place as version 6. For proxy settings, try this:

  • I’ll assume you followed the directions here: Install Docker Engine on CentOS | Docker Docs

  • Create the folder: /etc/systemd/system/docker.service.d/

  • Within that folder, create http-proxy.conf (so, your full file path is /etc/systemd/system/docker.service.d/http-proxy.conf) with the following format:
    [Service]
    Environment=“HTTP_PROXY=”

  • Now, you need to restart the service. With systemd, this is done as:

    systemctl daemon-reload
    systemctl restart docker

  • Now try ‘docker run hello-world’ and the proxy should be used for the image download.

3 Likes

Thank’s , i found a solution for the issue , i download the certificate of the proxy using the navigator and i put it under /etc/pki/ca-trust/source/anchors then i execute
update-ca-trust extract
i restart docker and every thing turn good

Hi

Facing similar issue while running docker run hello-world behind proxy on CentOS 7

docker: error pulling image configuration: Get https://dseasb33srnrn.cloudfront.net/registry-v2/docker/registry/v2/blobs/sha256/…: x509: certificate signed by unknown authority.

Can i get help on this.

in Service the ‘S’ should be in capital letter.

Not it is working for me.

Thanks