Correct host image cleanup: prune dangling only, keep tagged :latest
CI Smoke / toolchain (push) Successful in 2s
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user