Skip to content

feat: cleanup dangling images + arm version 0.17.0#19

Merged
enixCode merged 1 commit into
mainfrom
feat/cleanup-dangling-images
Jun 3, 2026
Merged

feat: cleanup dangling images + arm version 0.17.0#19
enixCode merged 1 commit into
mainfrom
feat/cleanup-dangling-images

Conversation

@enixCode
Copy link
Copy Markdown
Owner

@enixCode enixCode commented Jun 3, 2026

Add DockerRunner.cleanupDanglingImages(): prunes dangling image layers left by re-pulls/rebuilds, the one Docker resource light-runner created but never reclaimed. Removes dangling without force, never touches a tagged image; cache images stay under cleanupOrphanCache. Bumps TRACER_VERSION to 0.17.0. e2e: commit untagged image, assert removed, base image survives. light-run arms this on a periodic sweep. build with cc

light-runner already reaps containers, volumes, cache images, networks and
state files, but nothing pruned dangling images (untagged `<none>` layers left
by re-pulls and rebuilds), so disk crept up over time with no recourse.

- Add DockerRunner.cleanupDanglingImages(): lists `dangling=true` and removes
  each without force. Never touches a tagged image, so base images and reusable
  tags survive; layers still referenced by a live image or container are
  refused by the daemon and skipped. Cache images stay under cleanupOrphanCache.
- e2e test: commit an untagged image from alpine, assert the sweep removes it
  and leaves the tagged base image intact.
- Bump TRACER_VERSION to 0.17.0 (was stuck at 0.16.2 from the prior release
  race) so OTel scope version matches the package again.

This is the SDK half of closing the retention gap. light-run arms it (plus the
existing reapOrphans/cleanupOrphanCache/cleanupOrphanNetworks/reconcileStates)
on a periodic sweep.

build with cc
@enixCode enixCode merged commit 7ce7849 into main Jun 3, 2026
4 checks passed
@enixCode enixCode deleted the feat/cleanup-dangling-images branch June 3, 2026 12:51
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