Skip to content

Docker system prune 연동 + --include-destructive 게이트 #33

Description

@ohing504

목표

Docker 회수 액션(docker system prune)을 vendor cleanup으로 연동하되, 파괴적 명령이므로 --include-destructive 게이트 뒤에 둔다. #17의 스캔 트랙(PR #32)에서 분리된 후속.

선행: PR #32 — Docker.raw protected 스캔 + sparse sizing 완료. docker 스캐너가 이미 등록돼 있어 VendorCleaner 구현만 추가하면 CLI 배선은 자동으로 붙는다.

배경

docker system prune은 이미지·컨테이너·볼륨·빌드캐시를 삭제하는 되돌리기 어려운 작업이다. 프로젝트 CLAUDE.md는 이를 향후 --include-destructive 게이트로 미루도록 명시했고, 현재 그 게이트는 존재하지 않는다. 게이트는 Docker 전용이 아니라 크로스커팅 안전장치다.

범위

  • --include-destructive 플래그 신설 (internal/cli/clean.go): 없으면 파괴적 vendor cleanup을 목록에서 제외.
  • VendorCleanup에 destructive 표식 추가 (internal/scanner/scanner.go): 파괴적 액션을 데이터로 구분(현재 필드 없음). runVendorCleanups가 게이트로 필터.
  • DockerScannerVendorCleanups() 구현: LookPath("docker") 확인 후 docker system prune 등을 destructive 표식과 함께 제공(global.go의 동적 생성 패턴).
  • 확인 UX: 파괴적 실행 전 명시적 확인 흐름 검토(dry-run 우선).

완료 조건

  • 게이트 플래그 + destructive 필터 + Docker VendorCleanups 구현 + 테스트
  • docs/commands.md(플래그) + docs/ecosystems.md(Docker 섹션 prune 연동으로 갱신)
  • 실측: 게이트 없이 dry-run 시 prune 미실행, 게이트 on + 실행 시 회수 확인

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions