Pulling Docker images:

ARTIFACTORY: How to debug docker configuration issues

AuthorFullName__c
Scott Mosher
articleNumber
000005318
ft:sourceType
Salesforce
FirstPublishedDate
2022-06-23T09:15:17Z
lastModifiedDate
2024-03-10T07:44:28Z
VersionNumber
3
For Docker pulls, we don’t expect the same 401s. We now have the token, so we should see the user authenticated within the request. We now expect HEAD and GET requests.

|user|HEAD|/api/docker/docker-remote/v2/some-image/manifests/some-tag|200|

We then start to see the manifest pull.

|user|GET|/api/docker/docker-remote/v2/some-image/manifests/sha256:12321321adfasdf1f6a2a14b56891f10b6c87b7d7b846253f95934dd6932|200|

Once we get the manifest/s, we can then pull the actual blobs.

|user|GET|/api/docker/docker-remote/v2/some-image/blobs/sha256:eaaf2ec477ce7fcb2bc1f6a2a14b1f10b6c87b7d77b846253f95934dd6932|200|
|user|GET|/api/docker/docker-remote/v2/some-image/blobs/sha256:1f10b6c87b7d79222265c132a5231af7c8584a907e2afc6df0634b78ba98f|200|


Again, we can further test out this pull with a curl request. We will be using the token returned from the previous login request we ran.

curl -H "Authorization: Bearer <TOKEN>" -vk
https://PLATFORM_URL/v2/docker/hello-world/manifests/latest

(in this example docker is a virtual repository that contains a Docker remote repository pointing to dockerhub)