Skip to content

feat(scanner): add Docker disk image scanning (scan only) - #32

Merged
ohing504 merged 1 commit into
mainfrom
feat/docker-scanner
Jul 18, 2026
Merged

feat(scanner): add Docker disk image scanning (scan only)#32
ohing504 merged 1 commit into
mainfrom
feat/docker-scanner

Conversation

@ohing504

Copy link
Copy Markdown
Owner

Refs #17 (scan track only — docker system prune wiring deferred)

요약

Docker Desktop VM 디스크 이미지(Docker.raw)를 protected 아티팩트로 스캔한다. stat 기반 스캐너(xcode/global과 동형: 고정 home-relative 경로 + scan root scope 게이트).

  • 탐지: ~/Library/Containers/com.docker.docker/Data/vms/0/data/Docker.raw (기본 경로만; 비기본 data root 미추적)
  • protected: 이미지 하나에 모든 Docker 상태(이미지·컨테이너·볼륨)가 들어 있어 파일 삭제 = 전체 파괴. Protected: true로 cleaner가 path 삭제 거부.
  • sparse-aware sizing: 공유 Measure로 460G 선언 이미지가 실제 점유(~8G)로 산출. Docker 전용 sizing 코드 없음.

스코프 결정 (이슈와의 차이)

이슈 완료조건은 "vendor prune 연동"까지지만, docker system prune은 파괴적(이미지·볼륨·빌드캐시 삭제)이고 프로젝트 CLAUDE.md가 이를 --include-destructive 게이트 뒤로 미루도록 명시한다. 그 게이트는 현재 없음.

게이트는 Docker 전용이 아닌 크로스커팅 기능(CLI 플래그 + VendorCleanup destructive 필드 + 필터 + 확인 UX)이라 별도 트랙으로 분리했다. 이 PR은 스캔·protected·실측 트랙만 완결하고, prune 연동은 게이트 신설 작업으로 남긴다. 이슈 17은 close하지 않음.

검증

  • 단위 테스트 5개: protected 검출·이미지 부재·scope 제외·sparse sizing(apparent>disk)·등록
  • 전체 테스트 그린, lint 0 issues
  • 실제 머신 실측: Docker.raw disk 8.6G / apparent 494G, safety=protected, protected=true

문서

  • docs/ecosystems.md: Supported 표 implemented (scan only; prune deferred), Docker 섹션 신설(protected·sparse·prune 지연 명시)

🤖 Generated with Claude Code

Report the Docker Desktop VM disk image (Docker.raw) as a protected
artifact. It is a stat-based scanner: a fixed home-relative path, scope-
gated by the scan root like xcode/global. The image is marked Protected
so the cleaner refuses to path-delete it — all Docker state lives in that
one sparse file.

Sizing runs through the shared sparse-aware Measure, so a 460G-declared
image reports its real ~8G on-disk usage (Size) alongside the declared
size (ApparentSize) with no Docker-specific code.

Reclaiming space via `docker system prune` is destructive and stays
deferred behind a future --include-destructive gate; this change reports
the image and its footprint only, it does not wire up prune.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013SX3vRs78zFYA2kTRZAtg6
@ohing504
ohing504 merged commit dcc0d1f into main Jul 18, 2026
3 checks passed
@ohing504
ohing504 deleted the feat/docker-scanner branch July 18, 2026 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant