docker pull 访问registry过程

执行 docker pull daocloud.io/busybox 之后

 

步骤 请求 返回
1 GET https://daocloud.io/v2/ HTTP/1.1 HTTP/1.1 401 Unauthorized
Server: nginx/1.11.13
Date: Sun, 28 Jan 2018 02:35:17 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 87
Connection: close
Docker-Distribution-Api-Version: registry/2.0
Www-Authenticate: Bearer realm=”https://daohub-auth.daocloud.io/auth”,service=”daocloud.io”
X-Content-Type-Options: nosniff{“errors”:[{“code”:”UNAUTHORIZED”,”message”:”authentication required”,”detail”:null}]}
2 GET https://daohub-auth.daocloud.io/auth?scope=repository%3Abusybox%3Apull&service=daocloud.io HTTP/1.1 HTTP/1.1 200 OK
Server: nginx/1.11.6
Date: Sun, 28 Jan 2018 02:35:17 GMT
Content-Type: application/json
Content-Length: 570
Connection: close
X-Qequest-Time: 0.025{“token”:”eyJ0eXAiOiJKV1QiL省略_J0Mzfs”}
3 GET https://daocloud.io/v2/busybox/manifests/latest HTTP/1.1

Authorization: Bearer eyJ0eXAiOiJKV1QiL省略_J0Mzfs

HTTP/1.1 200 OK
Server: nginx/1.11.13
Date: Sun, 28 Jan 2018 02:35:18 GMT
Content-Type: application/vnd.docker.distribution.manifest.v2+json
Content-Length: 527
Connection: close
Docker-Content-Digest: sha256:4cee1979ba0bf7db9fc5d28fb7b798ca69ae95a47c5fecf46327720df4ff352d
Docker-Distribution-Api-Version: registry/2.0
Etag: “sha256:4cee1979ba0bf7db9fc5d28fb7b798ca69ae95a47c5fecf46327720df4ff352d”
X-Content-Type-Options: nosniff{
“schemaVersion”: 2,
“mediaType”: “application/vnd.docker.distribution.manifest.v2+json”,
“config”: {
“mediaType”: “application/vnd.docker.container.image.v1+json”,
“size”: 1497,
“digest”: “sha256:5b0d59026729b68570d99bc4f3f7c31a2e4f2a5736435641565d93e7c25bd2c3”
},
“layers”: [
{
“mediaType”: “application/vnd.docker.image.rootfs.diff.tar.gzip”,
“size”: 723070,
“digest”: “sha256:57310166fe88e0dc63a80ca5c219283a932db0f3969712e2f8a86ada143bf566”
}
]
}
4 GET https://daocloud.io/v2/busybox/blobs/
sha256:5b0d59026729b68570d99bc4f3f7c31a2e4f2a5736435641565d93e7c25bd2c3 HTTP/1.1

Authorization: Bearer eyJ省略

HTTP/1.1 307 Temporary Redirect
Server: nginx/1.11.13
Date: Sun, 28 Jan 2018 02:35:18 GMT
Content-Type: application/octet-stream
Content-Length: 311
Connection: close
Docker-Distribution-Api-Version: registry/2.0
Location: http://daohub.ufile.ucloud.com.cn/docker/registry/v2/blobs/
sha256/5b/5b0d59026729b68570d99bc4f3f7c31a2e4f2a5736435641565d93e7c25bd2c3/data?Expires=1517107218&Signature=Q72RCd%省略%3D&UCloudPublicKey=mhEYuIyt6tZwLlE省略Blg%2Bc
X-Content-Type-Options: nosniff 
5 GET http://daohub.ufile.ucloud.com.cn/docker/registry/v2/blobs/
sha256/5b/5b0d59026729b68570d99bc4f3f7c31a2e4f2a5736435641565d93e7c25bd2c3/data?Expires=1517107218&Signature=Q72RCd%省略%3D&UCloudPublicKey=mhEYuIyt6tZwLlE省略Blg%2Bc HTTP/1.1
返回具体文件内容



fatkun

折腾一下又不会死~

没有评论


You can leave the first : )



发表评论

电子邮件地址不会被公开。