简体   繁体   English

如何一次将100个docker镜像推送到docker hub?

[英]how to push 100s of docker images to the docker hub at once?

I am trying to find a way how to push 100s of images to the docker hub in a single short. 我正在尝试找到一种方法,可以在短时间内将100幅图像推送到Docker集线器。 Is there a better and efficient way to do this? 有没有更好,更有效的方法来做到这一点?

alpine:1.0.0.0
alpine:2.0.0.0
.
..
...
alpine:100.0.0.0

there are 100 images. 有100张图片。 I am looking for the best way to push all the images to the docker hub. 我正在寻找将所有图像推送到docker hub的最佳方法。

moby issue 9132 seems to indicate that you can push in parallel: Moby问题9132似乎表明您可以并行推送:

this was included in the 1.10.3 release, but requires a registry 2.3.x. 它已包含在1.10.3版本中,但需要一个注册表2.3.x。

You would need to: 您需要:

  • thread your docker push 将您的docker push穿线
  • change the --max-concurrent-uploads int of the docker daemon to 100 at least, in order to maximize the number of parallel pushed (by default limited to 5) --max-concurrent-uploads int 守护进程--max-concurrent-uploads int至少更改为100,以最大化并行推送的数量(默认限制为5)
  • make sure your network upload capacity can handle that kind of parallel queries! 确保您的网络上传能力可以处理这种并行查询!

Beside that, parallel push is requested since 2014 (see issue 7336 ) 除此之外,自2014年以来就要求并行推送(请参阅问题7336
There is PR 458 , but... PR 458 ,但是...

This change doesn't not address the fundamental problems that are brought up when requesting this feature. 此更改不能解决请求此功能时出现的基本问题。
The idea behind multiple push/pull arguments is that they are parallelized, but this simply performs them in sequence. 多个推/拉参数背后的想法是它们是并行的,但这只是按顺序执行它们。 This design provides no advantage over for i in images; do docker push $i; done 这种设计for i in images; do docker push $i; done没有提供优于for i in images; do docker push $i; done优势for i in images; do docker push $i; done for i in images; do docker push $i; done for i in images; do docker push $i; done . for i in images; do docker push $i; done

So you still need to script the threading of docker push . 因此,您仍然需要编写docker push线程的脚本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM