image-spec
image-spec copied to clipboard
Question: How to set proper artifactType
By referring to the information provided in the artifact guidelines, users can effectively build non-image artifacts. In cases where an artifact does not have a specific config layer, the config can be supplemented with an empty layer. The media type can be specified in the artifactType
field. For instance, an example value is application/vnd.example+type
. I would like to clarify the meaning of the +type
component in this context. Is it similar to +json
or +xml
? I am confused because the artifactType
already represents the type, so the inclusion of the format type only seems relevant if it pertains to the config.mediaType
. Could you please provide more guidance or suggestions on defining a proper artifactType
?
The artifactType field is defined above:
This OPTIONAL property contains the type of an artifact when the manifest is used for an artifact. This MUST be set when config.mediaType is set to the empty value. If defined, the value MUST comply with RFC 6838, including the naming requirements in its section 4.2, and MAY be registered with IANA. Implementations storing or copying image manifests MUST NOT error on encountering an artifactType that is unknown to the implementation.
See the RFC links for details about the syntax for a media type, and the link to the already registered IANA media types serve as a list of examples.
https://github.com/opencontainers/image-spec/issues/1143#issuecomment-1771193942