Repository navigation
feat: never count the new and the installed build in image cleanup - #40
Merged
Merged
Conversation
"Keep the last N" used to count the downloaded build and the one running
now, so keeping fewer old images meant risking the rollback target, and
the smallest choice was 3.
Now both always stay and are not counted; N (0-5) applies only to the
older images behind them. The update command records the image of the
running container in DOKPLOY_PREVIOUS_IMAGE before replacing it, so the
startup cleanup in the new container knows which build to keep for a
rollback. Without a recorded id the newest older image stands in for it.
The setting moved to DOKPLOY_KEEP_OLD_IMAGES ("off" disables it): an
existing DOKPLOY_KEEP_IMAGES=0 meant off and must not read as "keep none".
The update dialog now shows the installed fork build and official base
in a full-width card, refetches it when opened, and stops offering a
build that is already installed (e.g. updated from another tab).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes
DOKPLOY_PREVIOUS_IMAGEbeforedocker service update; the startup cleanup in the new container protects it alongside the running image. If no id was recorded, the newest older image stands in for it. Malformed ids are ignored.DOKPLOY_KEEP_OLD_IMAGES(offdisables). An existingDOKPLOY_KEEP_IMAGES=0meant "off" and must not be read as "keep none".Testing
__test__/settings: 127 passed, including a new test that runs the generated cleanup script against a stubdockerand checks which images get removed for keep 0/1/3 with and without a recorded previous image.tsc --noEmitand biome clean.🤖 Generated with Claude Code