Correct host image cleanup: prune dangling only, keep tagged :latest
CI Smoke / toolchain (push) Successful in 2s

The previous cleanup guidance removed the tagged :latest after push,
which deleted images still deployed on the Unraid host. Replace with
a dangling-only prune in both the troubleshooting doc and the sample
docker-build-push workflow; validated on jason/wfh (reclaimed 4.3GB).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Jason Stedwell
2026-07-02 09:25:25 -05:00
parent 1c679e3752
commit bac6129d78
2 changed files with 23 additions and 13 deletions
@@ -36,3 +36,11 @@ jobs:
.
docker push "${IMAGE}:latest"
docker push "${IMAGE}:${{ gitea.sha }}"
# Dangling-only prune: removes untagged leftovers from previous builds.
# Never removes tagged images (the fresh :latest may be deployed on the
# host) or any image referenced by a container. See
# docs/troubleshooting.md "Orphan images piling up on the host".
- name: Prune dangling images on host
if: always()
run: docker image prune -f 2>/dev/null || true