-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Description
Description of feature
Currently, dokku only keeps the latest image and deletes the previous image. If the deploy succeeds but the new version has a weird bug, this means rolling back can take an interminable amount of time.
We should allow users to set a builder
property named keep-count
. By default, this would be 0, but folks would be able to set it up to some limit (5? 10?). Images would now always have a version (as opposed to only when pushed), and we would cull anything past the limit when calling dokku_cleanup
. Additionally, dokku ps:retire
would now check to see if an image being deleted would be within the tagged versions we want to keep, and skip deleting them until enough deploys go by.
This would mean that users potentially use more disk space, but thats kinda on them to figure that out? Since it wouldn't be enabled by default, the existing functionality would still apply, meaning users wouldn't necessarily need to worry about system bloat.
Note that we'd need to worry about docker system prune
or docker image prune
being called by Dokku (I think we only prune the builder
), but if thats called by the user and it ends up deleting tracked images, there isn't much Dokku can/should do.