sylabs / oci-tools

Go module for working with OCI container images.
Apache License 2.0
1 stars 2 forks source link

feat: Update SIF from ImageIndex #62

Open dtrudg opened 2 weeks ago

dtrudg commented 2 weeks ago

Add sif.Update which accepts updates a SIF so that its content reflects the ImageIndex passed.

Any blobs in the SIF that are not present in the new ImageIndex will be removed from the SIF.

Any blobs that are present in the new ImageIndex, but not in the SIF, will be added to the SIF.

Blobs that are present in both the SIF and the new ImageIndex are not re-written. They will remain at their current descriptor location in the SIF.

Closes https://github.com/sylabs/oci-tools/issues/48feat: Update SIF from ImageIndex

Add sif.Update which accepts updates a SIF so that its content reflects the ImageIndex passed.

Any blobs in the SIF that are not present in the new ImageIndex will be removed from the SIF.

Any blobs that are present in the new ImageIndex, but not in the SIF, will be added to the SIF.

Blobs that are present in both the SIF and the new ImageIndex are not re-written. They will remain at their current descriptor location in the SIF.

Closes #48