fix(docker): Docker Hub untagged image 자동 삭제 API 수정#711
Merged
Conversation
기존 Advanced Image Management API(`/v2/repositories/.../images?status=inactive`)가
Docker Hub에서 폐지되어 404를 반환하고 있었음. 새로운 manifests API로 교체:
- LIST: GET /v2/namespaces/{ns}/repositories/{repo}/manifests
- DELETE: DELETE /v2/namespaces/{ns}/repositories/{repo}/manifests
인라인 bash 코드를 독립 Python 스크립트(bin/dockerhub-cleanup.py)로 분리.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
/v2/repositories/.../images?status=inactive)가 폐지(retired)되어 매 빌드마다 cleanup step이 404로 조용히 실패하고 있었음bin/dockerhub-cleanup.py)로 분리Details
Root Cause: Docker Hub가
/v2/repositories/{ns}/{repo}/images엔드포인트를 폐지.continue-on-error: true설정 때문에 실패가 숨겨져 있었음.New API:
GET /v2/repositories/.../images?status=inactiveGET /v2/namespaces/{ns}/repositories/{repo}/manifestsPOST /v2/repositories/.../images/deleteDELETE /v2/namespaces/{ns}/repositories/{repo}/manifests검증 결과: 로컬에서 실행하여 12개 untagged manifest 삭제 성공, 삭제 후 0개 확인.
Test plan
python3 bin/dockerhub-cleanup.py --dry-run로컬 실행 확인🤖 Generated with Claude Code