使用curl或wget从工件下载Docker映像..? [英] Download docker image from artifactory using curl or wget..?

查看:519
本文介绍了使用curl或wget从工件下载Docker映像..?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们是否有使用wget或curl下载docker映像的任何选项/方式。
我的docker映像存在于Jfrog人工制品中。

解决方案

首先,对Artifactory存储库的任何curl命令都需要您帐户的API密钥。请参阅 不使用Docker客户端时如何在Artifactory Docker存储库中使用docker Registry API?


您可以使用以下标头: X-JFrog-Art-Api,并传递用户的API密钥进行身份验证。可以从Artifactory中的用户配置文件页面检索用户的API密钥。 Artifactory REST API支持三种身份验证,您可以将它们中的任何一种与docker存储库一起使用


第二,下载映像不是琐碎的(因为您需要获取所有图层)。

您可能有机会改编Moby Contrib脚本 download-frozen-image-v2.sh



或尝试 docker-registry-debug ,它将打印一个curl命令以获取图层,如在此处说明。 / p>

Do we have any option/way to download a docker image using wget or curl. My docker image is present in Jfrog artifactory.

解决方案

First, any curl command to an Artifactory repo would need the API key of your account. See "How to use docker registry API with Artifactory Docker Repository when not using docker client?"

you can use the following header: "X-JFrog-Art-Api" and pass the API key of the user to authenticate. The API key of the user can be retrieved from the "User Profile" page in Artifactory. Artifactory REST API supports three forms of authentication and you can use any one of them with the docker repository

Second, downloading an image is not trivial (as you need to get all the layers).
You might have some chance adapting the moby contrib script download-frozen-image-v2.sh

Or try docker-registry-debug which will print a curl command for fetching the layer, as explained here.

这篇关于使用curl或wget从工件下载Docker映像..?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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