Skip to content
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

Store Image / ImageIndex with name / tag annotation #81

Closed
dtrudg opened this issue Sep 25, 2024 · 0 comments · Fixed by #87
Closed

Store Image / ImageIndex with name / tag annotation #81

dtrudg opened this issue Sep 25, 2024 · 0 comments · Fixed by #87
Assignees

Comments

@dtrudg
Copy link
Member

dtrudg commented Sep 25, 2024

OCI-SIF files can hold more than one OCI image and / or image index. When there is only one image in an OCI-SIF then consumers can trivially use that image. If more manifests are present in the RootIndex then we need to be able to select which one to use. Users are unlikely to wish to have to select between images using only a sha256 digest, given that friendly tags are used in most flows. We need to be able to store images in an OCI-SIF so that they are associated with a friendly tag.

By convention, in oci-layout directories, the index.json (analogous to our RootIndex) allows a tag / name to be associated with a manifest via the org.opencontainers.image.ref.name annotation. On the FileImage interface proposed in #80 we should provide a simple method to store an Image / ImageIndex with a tag that will become an org.opencontainers.image.ref.name annotation in the RootIndex.

This is likely via an option on AppendImage/Index methods discussed in #83

@dtrudg dtrudg changed the title Store Image / ImageIndex with tag annotation Store Image / ImageIndex with name / tag annotation Sep 25, 2024
@dtrudg dtrudg self-assigned this Sep 25, 2024
dtrudg added a commit to dtrudg/oci-tools that referenced this issue Sep 27, 2024
Adds `f.AppendImage` and `f.AppendIndex`, which append a `v1.Image` or a
`v1.ImageIndex` to the SIF, respectively.

The `OptAppendReference` functional option can be used to provide a
`name.Reference` that will be stored as an annotation against the new
descriptor in the RootIndex, with the key
`org.opencontainers.image.ref.name`, as is convention for associating
references with items stored in an OCI layout.

Fixes sylabs#83
Fixes sylabs#81
dtrudg added a commit to dtrudg/oci-tools that referenced this issue Sep 27, 2024
Adds `f.AppendImage` and `f.AppendIndex`, which append a `v1.Image` or a
`v1.ImageIndex` to the SIF, respectively.

The `OptAppendReference` functional option can be used to provide a
`name.Reference` that will be stored as an annotation against the new
descriptor in the RootIndex, with the key
`org.opencontainers.image.ref.name`, as is convention for associating
references with items stored in an OCI layout.

Fixes sylabs#83
Fixes sylabs#81
dtrudg added a commit to dtrudg/oci-tools that referenced this issue Sep 27, 2024
Adds `f.AppendImage` and `f.AppendIndex`, which append a `v1.Image` or a
`v1.ImageIndex` to the SIF, respectively.

The `OptAppendReference` functional option can be used to provide a
`name.Reference` that will be stored as an annotation against the new
descriptor in the RootIndex, with the key
`org.opencontainers.image.ref.name`, as is convention for associating
references with items stored in an OCI layout.

Fixes sylabs#83
Fixes sylabs#81
dtrudg added a commit to dtrudg/oci-tools that referenced this issue Sep 27, 2024
Adds `f.AppendImage` and `f.AppendIndex`, which append a `v1.Image` or a
`v1.ImageIndex` to the SIF, respectively.

The `OptAppendReference` functional option can be used to provide a
`name.Reference` that will be stored as an annotation against the new
descriptor in the RootIndex, with the key
`org.opencontainers.image.ref.name`, as is convention for associating
references with items stored in an OCI layout.

Fixes sylabs#83
Fixes sylabs#81
dtrudg added a commit to dtrudg/oci-tools that referenced this issue Sep 27, 2024
Adds `f.AppendImage` and `f.AppendIndex`, which append a `v1.Image` or a
`v1.ImageIndex` to the SIF, respectively.

The `OptAppendReference` functional option can be used to provide a
`name.Reference` that will be stored as an annotation against the new
descriptor in the RootIndex, with the key
`org.opencontainers.image.ref.name`, as is convention for associating
references with items stored in an OCI layout.

Fixes sylabs#83
Fixes sylabs#81
dtrudg added a commit to dtrudg/oci-tools that referenced this issue Sep 27, 2024
Adds `f.AppendImage` and `f.AppendIndex`, which append a `v1.Image` or a
`v1.ImageIndex` to the SIF, respectively.

The `OptAppendReference` functional option can be used to provide a
`name.Reference` that will be stored as an annotation against the new
descriptor in the RootIndex, with the key
`org.opencontainers.image.ref.name`, as is convention for associating
references with items stored in an OCI layout.

Fixes sylabs#83
Fixes sylabs#81
@dtrudg dtrudg closed this as completed in 99f75e5 Oct 1, 2024
@dtrudg dtrudg closed this as completed in #87 Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant