블롭 검색
블롭 검색 (Retrieve blob)
GET /v2/{name}/blobs/{digest} — 레지스트리에서 다이제스트로 식별된 블롭을 다운로드해요.
출처: 문서
본문
API 버전 2 — Retrieve blob · GET /v2/{name}/blobs/{digest}
레지스트리에서 다이제스트로 식별된 블롭을 다운로드해요.
블롭에는 이미지 레이어와 구성 객체가 포함돼요. 클라이언트는 매니페스트의 다이제스트를 사용해 블롭을 검색해야 해요.
이 엔드포인트는 CDN이나 저장 위치로 307 Temporary Redirect를 반환할 수 있어요. 클라이언트는 리디렉션을 따라 실제 블롭 콘텐츠를 얻어야 해요.
블롭 콘텐츠는 보통 (레이어의 경우) gzip된 tarball 또는 (구성의 경우) JSON이에요. MIME 유형은 보통 application/octet-stream이에요.
연결 및 접근 (Connection and access)
https://registry-1.docker.io — Docker Hub 레지스트리 API
다음 대안 중 하나를 사용해요. 한 대안 안의 요구 사항은 함께 적용돼요.
registryToken
파라미터
name
path · 필수 — 저장소 이름. 유형: string
{
"type": "string"
}
digest
path · 필수 — 블롭의 다이제스트. 유형: string
{
"type": "string"
}
요청 및 응답
Media type: application/octet-stream
응답 200
블롭 콘텐츠 직접 반환.
헤더:
Content-Length— 블롭의 크기(바이트)
{
"description": "Size of the blob in bytes",
"example": 32768,
"schema": {
"type": "integer"
}
}
Content-Type— 블롭의 MIME 유형
{
"description": "MIME type of the blob",
"example": "application/octet-stream",
"schema": {
"type": "string"
}
}
Docker-Content-Digest— 반환된 블롭의 다이제스트
{
"description": "Digest of the returned blob",
"example": "sha256:abc123def456...",
"schema": {
"type": "string"
}
}
유형: string
{
"format": "binary",
"type": "string"
}
small-layer:
응답 307
블롭 위치로 임시 리디렉션. 응답 콘텐츠는 선언되지 않음.
헤더:
Location— 블롭 다운로드용 리디렉션 URL (예: S3 또는 CDN)
{
"description": "Redirect URL for blob download (e.g., S3 or CDN)",
"example": "https://cdn.docker.io/blobs/library/ubuntu/abc123...",
"schema": {
"type": "string"
}
}
응답 401
인증 필요. 응답 콘텐츠는 선언되지 않음.
응답 403
접근 거부. 응답 콘텐츠는 선언되지 않음.
응답 404
블롭을 찾을 수 없음. 응답 콘텐츠는 선언되지 않음.
응답 429
요청이 너무 많음. 응답 콘텐츠는 선언되지 않음.
요청 예시
curl \
--request GET \
--header "Authorization: Bearer ***" \
--header 'Accept: application/octet-stream' \
'https://registry-1.docker.io/v2/library%2Fubuntu/blobs/sha256:abc123def456...'