美文网首页Golang语言社区
上传已存在镜像流程(docker push)

上传已存在镜像流程(docker push)

作者: AEGQ | 来源:发表于2017-08-16 09:06 被阅读266次

    GET /v2/

    GET /v2/ HTTP/1.0
    Host: mydocker.com
    Connection: close
    User-Agent: docker/17.05.0-ce go/go1.7.5 git-commit/89658be kernel/3.13.0-32-generic os/linux arch/amd64 UpstreamClient(Docker-Client/17.05.0-ce \(linux\))
    Accept-Encoding: gzip
    

    Response: 401

    HTTP/1.1 401 Unauthorized
    Date: Tue, 15 Aug 2017 08:56:58 GMT
    Content-Type: application/json;charset=ISO-8859-1
    Content-Length: 87
    Connection: close
    Server: Artifactory/5.3.0
    X-Artifactory-Id: e76be7247cc93a8cb24f8d5c0420dcb963becb79
    X-Artifactory-Node-Id: art1
    Docker-Distribution-Api-Version: registry/2.0
    WWW-Authenticate: Bearer realm="http://mydocker.com:80/artifactory/api/docker/pass-docker-local/v2/token",service="mydocker.com:80"
    
    {"errors":[{"code":"UNAUTHORIZED","message":"authentication required","detail":null}]}
    

    GET /artifactory/api/docker/pass-docker-local/v2/token...

    GET /artifactory/api/docker/pass-docker-local/v2/token?account=docker-pass&scope=repository%3Aopenab%2Fcadvisor%3Apush%2Cpull&service=mydocker.com%3A80 HTTP/1.1
    Host: mydocker.com:80
    User-Agent: docker/17.05.0-ce go/go1.7.5 git-commit/89658be kernel/3.13.0-32-generic os/linux arch/amd64 UpstreamClient(Docker-Client/17.05.0-ce \(linux\))
    Authorization: Basic NaA5MjAnMjE1NUozNDAzMjESt0d
    Accept-Encoding: gzip
    Connection: close
    

    Response: 200

    HTTP/1.1 200 OK
    Date: Tue, 15 Aug 2017 08:56:58 GMT
    Content-Type: application/json
    Transfer-Encoding: chunked
    Connection: close
    Server: Artifactory/5.3.0
    X-Artifactory-Id: e76be7247cc93a8cb24f8d5c0420dcb963becb79
    X-Artifactory-Node-Id: art1
    
    {"token":"AKCp2WXMq9Z6bx5C1GBQPq8tv7sXYxXnQ7Kb4Jon6GEN7ny1cHSK8w3nZd6totyUMCRy3SkyM","expires_in":3600}
    

    HEAD /v2/openab/cadvisor/blobs...

    HEAD /v2/openab/cadvisor/blobs/sha256:e0f06f2081e74da126db0f5b28ba1d6ee7c8e957ffa941ea01096f4c78800fef HTTP/1.0
    Host: mydocker.com
    Connection: close
    User-Agent: docker/17.05.0-ce go/go1.7.5 git-commit/89658be kernel/3.13.0-32-generic os/linux arch/amd64 UpstreamClient(Docker-Client/17.05.0-ce \(linux\))
    Authorization: Bearer AKCp2WXMq9Z6bx5C1GBQPq8tv7sXYxXnQ7Kb4Jon6GEN7ny1cHSK8w3nZd6totyUMCRy3SkyM
    

    HEAD /v2/openab/cadvisor/blobs...

    HEAD /v2/openab/cadvisor/blobs/sha256:fe5f7afa5c90970b19885dd39ca239f0e313358ba02adc807bbbb64e8890207b HTTP/1.0
    Host: mydocker.com
    Connection: close
    User-Agent: docker/17.05.0-ce go/go1.7.5 git-commit/89658be kernel/3.13.0-32-generic os/linux arch/amd64 UpstreamClient(Docker-Client/17.05.0-ce \(linux\))
    Authorization: Bearer AKCp2WXMq9Z6bx5C1GBQPq8tv7sXYxXnQ7Kb4Jon6GEN7ny1cHSK8w3nZd6totyUMCRy3SkyM
    

    HEAD /v2/openab/cadvisor/blobs...

    HEAD /v2/openab/cadvisor/blobs/sha256:12a7970a6783dc60e319ae3477ce11dc2a9c845a6ff3ac9a05820042245f08b6 HTTP/1.0
    Host: mydocker.com
    Connection: close
    User-Agent: docker/17.05.0-ce go/go1.7.5 git-commit/89658be kernel/3.13.0-32-generic os/linux arch/amd64 UpstreamClient(Docker-Client/17.05.0-ce \(linux\))
    Authorization: Bearer AKCp2WXMq9Z6bx5C1GBQPq8tv7sXYxXnQ7Kb4Jon6GEN7ny1cHSK8w3nZd6totyUMCRy3SkyM
    

    Response: 200

    HTTP/1.1 200 OK
    Date: Tue, 15 Aug 2017 08:56:58 GMT
    Content-Type: application/octet-stream
    Content-Length: 14092031
    Connection: close
    Server: Artifactory/5.3.0
    X-Artifactory-Id: e76be7247cc93a8cb24f8d5c0420dcb963becb79
    X-Artifactory-Node-Id: art1
    Docker-Distribution-Api-Version: registry/2.0
    Docker-Content-Digest: sha256:e0f06f2081e74da126db0f5b28ba1d6ee7c8e957ffa941ea01096f4c78800fef
    

    Response: 200

    HTTP/1.1 200 OK
    Date: Tue, 15 Aug 2017 08:56:58 GMT
    Content-Type: application/octet-stream
    Content-Length: 6902245
    Connection: close
    Server: Artifactory/5.3.0
    X-Artifactory-Id: e76be7247cc93a8cb24f8d5c0420dcb963becb79
    X-Artifactory-Node-Id: art1
    Docker-Distribution-Api-Version: registry/2.0
    Docker-Content-Digest: sha256:fe5f7afa5c90970b19885dd39ca239f0e313358ba02adc807bbbb64e8890207b
    

    Response: 200

    HTTP/1.1 200 OK
    Date: Tue, 15 Aug 2017 08:56:58 GMT
    Content-Type: application/octet-stream
    Content-Length: 2382651
    Connection: close
    Server: Artifactory/5.3.0
    X-Artifactory-Id: e76be7247cc93a8cb24f8d5c0420dcb963becb79
    X-Artifactory-Node-Id: art1
    Docker-Distribution-Api-Version: registry/2.0
    Docker-Content-Digest: sha256:12a7970a6783dc60e319ae3477ce11dc2a9c845a6ff3ac9a05820042245f08b6
    

    HEAD /v2/openab/cadvisor/blobs...

    HEAD /v2/openab/cadvisor/blobs/sha256:f9ba08bafdeaf8158b0c6dee1398bf023e7cb8f8505c0db0a65c1f7dd3dd8232 HTTP/1.0
    Host: mydocker.com
    Connection: close
    User-Agent: docker/17.05.0-ce go/go1.7.5 git-commit/89658be kernel/3.13.0-32-generic os/linux arch/amd64 UpstreamClient(Docker-Client/17.05.0-ce \(linux\))
    Authorization: Bearer AKCp2WXMq9Z6bx5C1GBQPq8tv7sXYxXnQ7Kb4Jon6GEN7ny1cHSK8w3nZd6totyUMCRy3SkyM
    

    Response: 200

    HTTP/1.1 200 OK
    Date: Tue, 15 Aug 2017 08:56:58 GMT
    Content-Type: application/octet-stream
    Content-Length: 4334
    Connection: close
    Server: Artifactory/5.3.0
    X-Artifactory-Id: e76be7247cc93a8cb24f8d5c0420dcb963becb79
    X-Artifactory-Node-Id: art1
    Docker-Distribution-Api-Version: registry/2.0
    Docker-Content-Digest: sha256:f9ba08bafdeaf8158b0c6dee1398bf023e7cb8f8505c0db0a65c1f7dd3dd8232
    

    PUT /v2/openab/cadvisor/manifests/latest

    PUT /v2/openab/cadvisor/manifests/latest HTTP/1.0
    Host: mydocker.com
    Connection: close
    Content-Length: 951
    User-Agent: docker/17.05.0-ce go/go1.7.5 git-commit/89658be kernel/3.13.0-32-generic os/linux arch/amd64 UpstreamClient(Docker-Client/17.05.0-ce \(linux\))
    Authorization: Bearer AKCp2WXMq9Z6bx5C1GBQPq8tv7sXYxXnQ7Kb4Jon6GEN7ny1cHSK8w3nZd6totyUMCRy3SkyM
    Content-Type: application/vnd.docker.distribution.manifest.v2+json
    Accept-Encoding: gzip
    
    {
       "schemaVersion": 2,
       "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
       "config": {
          "mediaType": "application/vnd.docker.container.image.v1+json",
          "size": 4334,
          "digest": "sha256:f9ba08bafdeaf8158b0c6dee1398bf023e7cb8f8505c0db0a65c1f7dd3dd8232"
       },
       "layers": [
          {
             "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
             "size": 2382651,
             "digest": "sha256:12a7970a6783dc60e319ae3477ce11dc2a9c845a6ff3ac9a05820042245f08b6"
          },
          {
             "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
             "size": 14092031,
             "digest": "sha256:e0f06f2081e74da126db0f5b28ba1d6ee7c8e957ffa941ea01096f4c78800fef"
          },
          {
             "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
             "size": 6902245,
             "digest": "sha256:fe5f7afa5c90970b19885dd39ca239f0e313358ba02adc807bbbb64e8890207b"
          }
       ]
    }
    

    Response: 201

    HTTP/1.1 201 Created
    Date: Tue, 15 Aug 2017 08:56:58 GMT
    Content-Type: text/plain
    Content-Length: 0
    Connection: close
    Server: Artifactory/5.3.0
    X-Artifactory-Id: e76be7247cc93a8cb24f8d5c0420dcb963becb79
    X-Artifactory-Node-Id: art1
    Docker-Distribution-Api-Version: registry/2.0
    Docker-Content-Digest: sha256:7fd8f44eb291c07eeedaa7f399243cd22b7c72cbd540a46572232f0f3018e70c
    
    

    相关文章

      网友评论

        本文标题:上传已存在镜像流程(docker push)

        本文链接:https://www.haomeiwen.com/subject/ymdvrxtx.html