docker - 如何用 Artifactory 镜像dockerhub

标签 docker artifactory dockerhub

由于dockerhub已开始限制非付费帐户的下载,因此我经常收到此错误

ERROR: Preparation failed: Error response from daemon: toomanyrequests: You have reached your pull rate limit. You may increase the limit by authenticating and upgrading: https://www.docker.com/increase-rate-limit (executor_docker.go:188:15s)
https://docs.docker.com/docker-hub/download-rate-limit/
我有一个人工服务器,如何设置docker首先从人工缓存/镜像?

最佳答案

首先在https://registry-1.docker.io上设置一个指向docker hub的 Artifactory Remote
enter image description here
然后将所有 docker 代理重新配置为使用Registry_mirror。有多种方法可以执行此操作,但是最容易将--registry-mirror添加到docker启动选项中。请参阅Docker文档以获取更多信息
https://docs.docker.com/registry/recipes/mirror/
方法1
将--registry-mirror添加到/etc/default/docker中的OPTIONS变量

cat /etc/default/docker
OPTIONS=" -H unix:///var/run/docker.sock --ip-forward=true --iptables=true --ip-masq=true --registry-mirror=https://docker.artifactory.example.com -G docker"

方法二
编辑/etc/docker/registry/config.yml
proxy:
  remoteurl: https://registry-1.docker.io
  username: [username]
  password: [password]
方法3
如果使用puppet,则配置如下所示
  class { '::docker':
    use_upstream_package_source => false,
    manage_package              => false,
    registry_mirror             => 'https://docker.artifactory.example.com',
  }

关于docker - 如何用 Artifactory 镜像dockerhub,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64685593/

相关文章:

java - 从 Java 将文件上传到artifactory

docker - 使用 Cloudflare 设置 Traefik

powershell - cUrl与Invoke-WebRequest

docker - Docker容器内的Kerberos客户端

java - 由于 "maven-metadata-bintray-central.xml"文件中的错误,Maven 构建失败

Docker 集线器 : How do I pull an older version of a 3rd party image?

docker - Docker中心/商店未显示构建信息

docker - 如何从Docker Hub获得用于开放自由镜像的稳定版本?

docker - CentOS 8 : Problem: package docker-ce-xxxxxx. x86_64 需要 containerd.io >= 1.4.1

Docker 构建退出,退出代码为 : 1