Certificate Verification Error for index.docker.io: self signed certificate in certificate chain

So it seems the docker registry itself rejects my connection:

bernat@uvm ~ $ curl https://index.docker.io
<html>
            <head>
                <title>502 Bad Gateway</title>
            </head>
            <body>Certificate Verification Error for index.docker.io: self signed certificate in certificate chain (errno: 19, depth: 2)</body>
        </html>%  

Any ideas if and how I can bypass this warning? I’m using Ubuntu 16.04 in a VM, with systemd. The reason for having the self signed certificate is for a dynamic proxy selection (different for internal and external). Connecting to an internal private register works though. I’ve installed the self signed certificate inside the system as trusted.

Thanks!

@gaborbernat: We faced the same issue last week.It was our network team who blocked all the traffice to/from docker.io
Check with your network team if index.docker.io is whitelisted. As far as I know you don’t need any certificate to connect to docker hub.