镜像私有Docker注册表 [英] Mirroring private docker registry

查看:219
本文介绍了镜像私有Docker注册表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当前推荐的镜像私人Docker注册中心的方法是什么?

What is currently the recommended way to mirror a Private Docker Registry?

镜像功能由官方docker-registry镜像提供,但仅适用于公共注册中心。
请参见文档
请注意镜像仅适用不能为私有注册表创建镜像。

Mirroring functionality is provided by official docker-registry image but only for the Public Registry. See documentation: "Beware that mirroring only works for the public registry. You can not create a mirror for a private registry."

我的用例:
一个更大的开发团队正在网络有限的办公室。他们仅从注册表中提取docker映像。推送偶尔是由AWS托管的Jenkins box处理的。他们使用的大多数图像都位于我们受密码保护的专用注册表中(通过https提供)。因此,将注册表镜像/缓存到本地网络中的计算机上是很自然的。如果不是https,那么我只会去HTTP_PROXY和本地鱿鱼安装。

My use-case: A bigger development team that is working in an office with a limited network. They only pull docker images from registries. Pushing is occasional and handled by Jenkins box hosted in AWS. Most of the images they use resides in our password protected Private Registry (served over https). So it's only natural to mirror/cache the Registry on a machine in a local network. If not for https I would just go for HTTP_PROXY and local squid install.

我确定我不是唯一一个解决docker dev带宽问题的人。您该怎么办?

I'm sure I'm not the only one solving docker dev bandwidth problem. What do you do?

推荐答案

现在可以使用V2注册表配置中的代理设置来做到这一点。 。只需设置另一个注册表(与您拥有的任何其他私有注册表在不同的服务器/端口上),并在每个docker引擎上,将 --registry-mirror标志设置为指向它。

It is now possible to do this with the "proxy" settings in the configuration for a V2 registry. Just put up another registry (on a different server/port from any other private registry you have) and on every docker engine, set the '--registry-mirror' flag to point to it.

请当心意外的推送-如果您希望将图像保留为私有,请始终将其重新标记到私有注册表或私有存储库中。

Just watch out for accidental pushes - always retag your images to the private registry or a private repository if you wish to keep them private.

这篇关于镜像私有Docker注册表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆