使用代理下载非docker hub的镜像如google cloud private registry

修改 /etc/default/docker 添加代理

HTTP_PROXY="http://127.0.0.1:8087"
HTTPS_PROXY="https://127.0.0.1:8087"
http_proxy="${HTTP_PROXY}"
https_proxy="${HTTPS_PROXY}"
export HTTP_PROXY
export HTTPS_PROXY
export http_proxy
export https_proxy

 

修改docker_opts, 添加 --insecure-registry gcr.io

 如:

OPTIONS='--selinux-enabled --insecure-registry gcr.io'

 

gcr.io为私有仓库

你可能感兴趣的:(使用代理下载非docker hub的镜像如google cloud private registry)