Docker behind proxy that changes ssl certificate

后端 未结 3 537
孤独总比滥情好
孤独总比滥情好 2020-12-14 08:59

I am trying to run the following docker command:

docker run -i -t ubuntu /bin/bash

But I get the error:

Unable to find imag         


        
3条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-14 09:22

    @jpetazzo's answer is overall correct, however there is a nicer way to do the same thing (without manually editing a ca-bundle file):

    • on CentOS:

      sudo cp yourcert.crt /etc/pki/ca-trust/source/anchors/
      sudo update-ca-trust extract
      sudo service docker restart
      
    • on Debian:

      sudo cp yourcert.crt /usr/local/share/ca-certificates/
      sudo update-ca-certificates
      sudo service docker restart
      

    Note that restarting docker daemon is necessary!

提交回复
热议问题