3.0 - image cache update?

Is there a way that cached images can be updated, preferably auto-updating itselfs, as opposed having to install updates in every container generated from a cached image?


Is the answer so obvious that I missed it somehow or is there no way to prevent the downloaded image cache from going stale at some point? Over time updates for new containers created from the cache will increase and it will be tedious of having to download the updates for each new container rather than being fed from a fresh cache.

The images do auto-update, so if you create container c1 from ubuntu:18.04 and a newer version of the image becomes available, creating a new container called c2 will use the newer image.

Existing containers do have to be manually updated as any normal system would. Exact same behavior as if it was a virtual machine or physical system. You can optimize the original creation time with caching (which we do) but there’s no magic bullet for upgrading.

1 Like

:+1:

The image auto-update was not clear to me :blush: and it is good to know that it exists. When is the auto-update being invoked - e.g. every time lxc-create is executed is it cheking for updated images vs. the one in the cache?

Sure understand about housekeeping of existing containers.

The image comes with an expiry (I believe 30 days is most common) after which a download will happen again. The download template also comes with options to bypass the local cache or force using it even for an expired image.