-
-
Notifications
You must be signed in to change notification settings - Fork 225
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add --replace
to incus image import
#1383
Comments
That one is a bit tricky :) We do have the concept of an image expiry that you can set through In general I don't want us to try to be too smart about deleting images that didn't come from an external source as that could lead to straight up data loss. How are your images generated? Are you using |
My image building script is here: https://salsa.debian.org/-/snippets/750 So, I think what I'm looking for is something like an |
Do you have a reason to want the previous image to still exist following that If not, we could pretty easily put a |
If the new one were no good for some reason, possibly. But that's not a problem I've had to deal with, so |
Sounds good, we can definitely add something like that! |
I'm not sure about the underlying mechanics here, but it feels conceivable that - at the time of updating the image - there still is a container using the old one. Once it is finished doing its thing, I no longer need the old image, but until the old container exits, I'd prefer the replaced image to continue to be available. Is this covered? |
Unlike say Docker where you need the image to be around for the container to be functional, this isn't the case with Incus. Images are only used at the time the instance is created and it can be deleted from the image store immediately afterwards. So there generally isn't really a reason to want to keep an image around just because you have a container on the system which was created from it. As our instances can be very long lived (multiple years), doing so would quickly lead to a rather sizable pile of images being kept around. |
Incus expires remote images after a while, but there is no equivalent mechanism for local images.
I build my own images locally, occasionally. The latest image for each release gets an alias, taking it away from the previous image. It would be nice if there was a way to expire out the old images automatically. At the moment I have to do that manually.
The text was updated successfully, but these errors were encountered: