---
# System prepended metadata

title: How images/artifacts are stored

---

# How images/artifacts are stored
## Manifests
## Images
Docker V2: https://docs.docker.com/registry/spec/manifest-v2-2/#media-types
OCI Image: https://github.com/opencontainers/image-spec/blob/main/manifest.md

## Artifacts
OCI Artifact: https://github.com/opencontainers/image-spec/blob/main/artifact.md

## Layers
https://github.com/opencontainers/image-spec/blob/main/layer.md


# Why types cannot be resolved based on media type
## Requirements
Determine type of the artifact:
Helm
<- application/vnd.cncf.helm.chart.content.v1.tar+gzip 
<- application/vnd.docker.image.rootfs.diff.tar.gzip 


OCIArtifact
<- application/vnd.oci.image.layer.v1.tar 


ArmTemplate 
<- application/vnd.oci.image.layer.v1.tar


Question
application/vnd.oci.image.layer.v1.tar: OCIArtifact or ArmTemplate?

# Optimal solution:
Use manifest annotation: https://github.com/opencontainers/image-spec/blob/main/annotations.md#pre-defined-annotation-keys

Exception: if media type is `application/vnd.docker.distribution.manifest.v2+json` or `application/vnd.docker.distribution.manifest.list.v2+json` => docker image

Still need to check if annotating is supported for all user toolings:
1) oras supports annotation natively
2) docker supports specific annotation via LABEL: 
