Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Download docker image from artifactory using curl or wget..?

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

like image 560
Rohith Avatar asked Feb 27 '18 05:02

Rohith


1 Answers

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.

like image 160
VonC Avatar answered Nov 05 '22 08:11

VonC