i’m trying to map a container from api.GetConatiners() an image from api.GetImages(). However, there seems to be zero correlation. Because the CRI needs (wants) that
There are, however, a few red herrings, which is why it took me so long to finally put this question up:
api.Container.Config.Properties["volatile.base_image"] looks like the api.Image.Fingerprint but has a different value (i assume it is the fingerprint after the template has been applied to it?)
api.GetContainerMetadata() returns api.ImageMetadata, takes roughly forever[1] — and again, returns no fingerprint which could be used to map the image
1: on my laptop, with lxd (installed from snap) with 5 containers (2 running) and 4 images - with ZFS storage backend — in case that makes a difference
There is however no guarantee that the image will be kept around. They get replaced as newer versions are available and so will go away from your cache and the remote server a few days down the line.