注:参考官方文档:https://docs.docker.com/registry/spec/api/
1 与api交互http code
1.1 http code list
编码 | 说明 |
---|---|
200 | All right ok |
202 | the image exists and has been successfully deleted |
400 | The name or reference was invalid. |
401 | The client is not authenticated. |
403 | The client does not have required access to the repository / The registry does not implement the V2 API. |
404 | The repository is not known to the registry. |
1.2 GET /v2/
Code:200 ok
说明:On Success: OK
Code:404 not found
说明:The registry does not implement the V2 API.
Code:401 Unauthorized
说明:The client is not authenticated.
1.3 GET /v2/_catalog
Code:200 ok 说明:On Success: OK
1.4 GET /v2//tags/list
Code:200 OK
说明:On Success: OK
Code:401 Unauthorized
说明:The client is not authenticated.
Code:404 Not Found
说明:The repository is not known to the registry
Code:403 Forbidden
说明:The client does not have required access to the repository.
1.5 GET /v2//manifests/
Code:200 ok
说明:On Success: OK
Code:400 Bad Request
说明:The name or reference was invalid.
Code:401 Unauthorized
说明:The client is not authenticated.
Code:404 Not Found
说明:The repository is not known to the registry.
Code:403 Forbidden
说明:The client does not have required access to the repository.
1.6 DELETE /v2//manifests/
Code: 202 Accepted
说明:the image exists and has been successfully deleted
Code:404 Not Found
说明:the image had already been deleted or did not exist
2 通过调用api遇到错误码
2.1 BLOB_UNKNOWN
基本信息:
blob unknown to registry
详细描述:
This error may be returned when a blob is unknown to the registry in a specified repository. This can be returned with a standard get or if a manifest references an unknown layer during upload.
2.2 BLOB_UPLOAD_INVALID
基本信息:
blob upload invalid
详细描述:
The blob upload encountered an error and can no longer proceed.
2.3 BLOB_UPLOAD_UNKNOWN
基本信息:
blob upload unknown to registry
详细描述:
If a blob upload has been cancelled or was never started, this error code may be returned.
2.4 DIGEST_INVALID
基本信息:
provided digest did not match uploaded content
详细描述:
When a blob is uploaded, the registry will check that the content matches the digest provided by the client. The error may include a detail structure with the key “digest”, including the invalid digest string. This error may also be returned when a manifest includes an invalid layer digest.
2.5 MANIFEST_BLOB_UNKNOWN
基本信息:
blob unknown to registry
详细描述:
This error may be returned when a manifest blob is unknown to the registry.
2.6 MANIFEST_INVALID
基本信息:
manifest invalid
详细描述:
During upload, manifests undergo several checks ensuring validity. If those checks fail, this error may be returned, unless a more specific error is included. The detail will contain information the failed validation.
2.7 MANIFEST_UNKNOWN
基本信息:
manifest unknown
详细描述:
This error is returned when the manifest, identified by name and tag is unknown to the repository.
2.8 MANIFEST_UNVERIFIED
基本信息:
manifest failed signature verification
详细描述:
During manifest upload, if the manifest fails signature verification, this error will be returned.
2.9 NAME_INVALID
基本信息:
invalid repository name
详细描述:
Invalid repository name encountered either during manifest validation or any API operation.
2.10 NAME_UNKNOWN
基本信息:
repository name not known to registry
详细描述:
This is returned if the name used during an operation is unknown to the registry.
2.11 SIZE_INVALID
基本信息:
provided length did not match content length
详细描述:
When a layer is uploaded, the provided size will be checked against the uploaded content. If they do not match, this error will be returned.
2.12 TAG_INVALID
基本信息:
manifest tag did not match URI
详细描述:
During a manifest upload, if the tag in the manifest does not match the uri tag, this error will be returned.
2.13 UNAUTHORIZED
基本信息:
authentication required
详细描述:
The access controller was unable to authenticate the client. Often this will be accompanied by a Www-Authenticate HTTP response header indicating how to authenticate.
2.14 DENIED
基本信息:
requested access to the resource is denied
详细描述:
The access controller denied access for the operation on a resource.
2.15 UNSUPPORTED
基本信息:
The operation is unsupported.
详细描述:
The operation was unsupported due to a missing implementation or invalid set of parameters.
小笨驴在吃草的时候创建了微信公众号,为方便更多觅食的“小笨驴”,为大家准备了大量的免费基础教学资料以及技术解决方案,还会定时发布一些好的技术文章,当然也会扯扯蛋、谈谈人生、呵呵,希望我们这群乐于分享技术的“小笨驴”团队越来越大!