查看“DockerHub镜像加速和代理”的源代码
←
DockerHub镜像加速和代理
跳到导航
跳到搜索
因为以下原因,您没有权限编辑本页:
您所请求的操作仅限于该用户组的用户使用:
用户
您可以查看与复制此页面的源代码。
=2024= <pre> #Aug 22 2024 最新进度 不用科学上网 也可用上自己的aliyun 镜像加速器 sudo mkdir -p /etc/docker sudo tee /etc/docker/daemon.json <<-'EOF' { "registry-mirrors": ["https://747qfuir.mirror.aliyuncs.com"] } EOF sudo systemctl daemon-reload sudo systemctl restart docker cat /etc/docker/ daemon.json key.json root@myxps:~# cat /etc/docker/daemon.json { "registry-mirrors": [ "https://docker.m.daocloud.io" ] } root@myxps:~# docker pull nginx:mainline-alpine3.20-slim mainline-alpine3.20-slim: Pulling from library/nginx c6a83fedfae6: Already exists 7f5898476db7: Pull complete 41c49cbde6a6: Pull complete 9da224fdd412: Pull complete Digest: sha256:2be9e698d136d4d9be33d1852b1259bc1b80e20aed0c964cbcd6086da7fad5c7 Status: Downloaded newer image for nginx:mainline-alpine3.20-slim docker.io/library/nginx:mainline-alpine3.20-slim #Aug 19 2024 原因在此 The Forbidden error occurs if the url is is not accessible, in this case https://production.cloudflare.docker.com/. All the below urls have to be whitelisted behind a proxy / firewall. https://auth.docker.io https://registry-1.docker.io https://production.cloudflare.docker.com 2024 要login hubdocker 可能得代理才行 # docker pull redis:7.4-alpine 7.4-alpine: Pulling from library/redis c6a83fedfae6: Pulling fs layer 9d56419430d6: Pulling fs layer 9d36ad935203: Pulling fs layer 0085610e8e12: Waiting 6c8161c30f9c: Waiting ba03bb8a47bb: Waiting 4f4fb700ef54: Waiting 5d7c7efa14ca: Waiting error pulling image configuration: Get "https://production.cloudflare.docker.com/registry-v2/docker/registry/v2/blobs/sha256/da/da7b3f96549f51221ac02ad16251b3d0df33bbc4490971b48348fc87eadc4a77/data?verify=1723966233-CNOT0xo1C1m2mDPPN2J1uvTx5ZU%3D": dial tcp 31.13.94.23:443: i/o timeout 配置mirrors 改了dns 也是这样 代理 是最快的办法 可能不是最好的 cat /etc/systemd/system/docker.service.d/http-proxy.conf [Service] Environment="HTTP_PROXY=http://localhost:8080" Environment="HTTPS_PROXY=http://localhost:8080" docker pull redis:7.4-alpine 7.4-alpine: Pulling from library/redis c6a83fedfae6: Pull complete 9d56419430d6: Pull complete 9d36ad935203: Pull complete 0085610e8e12: Pull complete 6c8161c30f9c: Pull complete ba03bb8a47bb: Pull complete 4f4fb700ef54: Pull complete 5d7c7efa14ca: Pull complete Digest: sha256:eaea8264f74a95ea9a0767c794da50788cbd9cf5223951674d491fa1b3f4f2d2 Status: Downloaded newer image for redis:7.4-alpine </pre> [https://segmentfault.com/a/1190000044981231 从 Docker Hub 拉取镜像受阻?这些解决方案帮你轻松应对] https://github.com/DaoCloud/public-image-mirror =old= 国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。Docker 官方和国内很多云服务商都提供了国内加速器服务。 配置加速地址 Ubuntu 16.04+、Debian 8+、CentOS 7+ <pre> sudo mkdir -p /etc/docker #下面这几个已被下掉 可能要找新的才行 sudo tee /etc/docker/daemon.json <<-'EOF' { "registry-mirrors": [ "https://1nj0zren.mirror.aliyuncs.com", "https://docker.mirrors.ustc.edu.cn", "http://f1361db2.m.daocloud.io", "https://registry.docker-cn.com" ] } EOF sudo systemctl daemon-reload sudo systemctl restart docker </pre> =查看= <pre> docker info Experimental: false Insecure Registries: 127.0.0.0/8 Registry Mirrors: https://1nj0zren.mirror.aliyuncs.com/ https://docker.mirrors.ustc.edu.cn/ http://f1361db2.m.daocloud.io/ https://registry.docker-cn.com/ Live Restore Enabled: false WARNING: No swap limit support </pre> =see also= [https://stackoverflow.com/questions/71048951/docker-error-pulling-image-configuration-get-https-production-cloudflare-doc docker: error pulling image configuration: Get https://production.cloudflare.docker.com Forbidden] [https://zhpengfei.com/dockerhub-in-china-via-cloudflare-workers/ Docker hub 被墙替代方案 / 在中国大陆通过Cloudflare Workers代理访问Docker Hub ] [https://xiaowangye.org/posts/china-docker-registry-proxy-guide/ 解决国内无法下载 Docker 镜像的问题] [https://www.cnblogs.com/Chary/p/18096678 如何优雅的给 Docker 配置网络代理] [https://y0ngb1n.github.io/a/docker-registry-mirrors.html?js Docker Hub 镜像加速器] [[category:Container]]
返回至
DockerHub镜像加速和代理
。
导航菜单
个人工具
登录
名字空间
页面
讨论
变种
视图
阅读
查看源代码
查看历史
更多
搜索
导航
首页
我的导航
关于我
shell
python
ops
linuxchina.net
blog.linuxchina
最近更改
随机页面
帮助
工具
链入页面
相关更改
特殊页面
页面信息