### Example Base Layer Resources Source: https://github.com/opencontainers/image-spec/blob/main/layer.md Illustrates the initial state of files in a base layer before modifications. ```text file1 a/file2 b/ c/file3 ``` -------------------------------- ### Validate Examples Source: https://github.com/opencontainers/image-spec/blob/main/HACKING.md Execute tests that validate the examples provided within the project. ```shell make validate-examples ``` -------------------------------- ### Example Layer with Opaque Whiteout Source: https://github.com/opencontainers/image-spec/blob/main/layer.md Illustrates the use of an opaque whiteout file to remove all children of a directory. ```text bin/ .wh..wh..opq ``` -------------------------------- ### Example OCI Image Manifest Blob Source: https://github.com/opencontainers/image-spec/blob/main/image-layout.md This example shows the content of a manifest blob, which describes the image's configuration and layers. It includes media types, sizes, and digests for the configuration and layers. ```shell $ cat ./blobs/sha256/9b97579de92b1c195b85bb42a11011378ee549b02d7fe9c17bf2a6b35d5cb079 | jq { "schemaVersion": 2, "manifests": [ { "mediaType": "application/vnd.oci.image.manifest.v1+json", "size": 7143, "digest": "sha256:afff3924849e458c5ef237db5f89539274d5e609db5db935ed3959c90f1f2d51", "platform": { "architecture": "ppc64le", "os": "linux" } }, ... ``` -------------------------------- ### Example OCI Image Manifest Blob (Config and Layers) Source: https://github.com/opencontainers/image-spec/blob/main/image-layout.md This example displays the content of an OCI image manifest, detailing the configuration and layer information. It specifies the media type, size, and digest for the image configuration and its layers. ```shell $ cat ./blobs/sha256/afff3924849e458c5ef237db5f89539274d5e609db5db935ed3959c90f1f2d51 | jq { "schemaVersion": 2, "config": { "mediaType": "application/vnd.oci.image.config.v1+json", "size": 7023, "digest": "sha256:5b0bcabd1ed22e9fb1310cf6c2dec7cdef19f0ad69efa1f392e94a4333501270" }, "layers": [ { "mediaType": "application/vnd.oci.image.layer.v1.tar+gzip", "size": 32654, "digest": "sha256:9834876dcfb05cb167a5c24953eba58c4ac89b1adf57f28f2f9d09af107ee8f0" }, ... ``` -------------------------------- ### Example Layer with Opaque Whiteout on Nested Directory Source: https://github.com/opencontainers/image-spec/blob/main/layer.md Shows a layer where an opaque whiteout is applied to 'a/', followed by the recreation of 'a/b/c/foo'. ```text a/ a/.wh..wh..opq a/b/ a/b/c/ a/b/c/foo ``` -------------------------------- ### Example Base Layer for Opaque Whiteout Source: https://github.com/opencontainers/image-spec/blob/main/layer.md Demonstrates a base layer structure to illustrate the application of opaque whiteouts. ```text etc/ my-app-config bin/ my-app-binary my-app-tools tools/ my-app-tool-one ``` -------------------------------- ### Example Base Layer for Opaque Whiteout on Nested Directory Source: https://github.com/opencontainers/image-spec/blob/main/layer.md Provides a base layer with nested directories to demonstrate opaque whiteout on a parent directory. ```text a/ a/b/ a/b/c/ a/b/c/bar ``` -------------------------------- ### Initial Empty Directory Structure Source: https://github.com/opencontainers/image-spec/blob/main/layer.md Represents the starting point of a layer's root filesystem as an empty directory. This serves as a baseline for tracking changes. ```text rootfs-c9d-v1/ ``` -------------------------------- ### Example OCI Image Configuration JSON Source: https://github.com/opencontainers/image-spec/blob/main/config.md This JSON document represents a typical configuration for an OCI image, detailing its creation metadata, runtime settings, and filesystem history. ```json { "created": "2015-10-31T22:22:56.015925234Z", "author": "Alyssa P. Hacker ", "architecture": "amd64", "os": "linux", "config": { "User": "alice", "ExposedPorts": { "8080/tcp": {} }, "Env": [ "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", "FOO=oci_is_a", "BAR=well_written_spec" ], "Entrypoint": [ "/bin/my-app-binary" ], "Cmd": [ "--foreground", "--config", "/etc/my-app.d/default.cfg" ], "Volumes": { "/var/job-result-data": {}, "/var/log/my-app-logs": {} }, "WorkingDir": "/home/alice", "Labels": { "com.example.project.git.url": "https://example.com/project.git", "com.example.project.git.commit": "45a939b2999782a3f005621a8d0f29aa387e1d6b" } }, "rootfs": { "diff_ids": [ "sha256:c6f988f4874bb0add23a778f753c65efe992244e148a1d2ec2a8b664fb66bbd1", "sha256:5f70bf18a086007016e948b04aed3b82103a36bea41755b6cddfaf10ace3c6ef" ], "type": "layers" }, "history": [ { "created": "2015-10-31T22:22:54.690851953Z", "created_by": "/bin/sh -c #(nop) ADD file:a3bc1e842b69636f9df5256c49c5374fb4eef1e281fe3f282c65fb853ee171c5 in /" }, { "created": "2015-10-31T22:22:55.613815829Z", "created_by": "/bin/sh -c #(nop) CMD [\"sh\"]", "empty_layer": true }, { "created": "2015-10-31T22:22:56.329850019Z", "created_by": "/bin/sh -c apk add curl" } ] } ``` -------------------------------- ### ImageID Format Example Source: https://github.com/opencontainers/image-spec/blob/main/config.md Provides an example of the ImageID format, which is a SHA256 hash of the image's configuration JSON. This format ensures that images are content-addressable. ```text sha256:a9561eb1b190625c9adb5a9513e72c4dedafc1cb2d4c5236c9a6957ec7dfd5a9 ``` -------------------------------- ### OCI Image Manifest Example Source: https://github.com/opencontainers/image-spec/blob/main/manifest.md An example of an OCI image manifest, which describes the layers and configuration of a container image. It includes digests and sizes for the image configuration and its layers, as well as optional subject and annotation fields. ```json { "schemaVersion": 2, "mediaType": "application/vnd.oci.image.manifest.v1+json", "config": { "mediaType": "application/vnd.oci.image.config.v1+json", "digest": "sha256:b5b2b2c507a0944348e0303114d8d93aaaa081732b86451d9bce1f432a537bc7", "size": 7023 }, "layers": [ { "mediaType": "application/vnd.oci.image.layer.v1.tar+gzip", "digest": "sha256:9834876dcfb05cb167a5c24953eba58c4ac89b1adf57f28f2f9d09af107ee8f0", "size": 32654 }, { "mediaType": "application/vnd.oci.image.layer.v1.tar+gzip", "digest": "sha256:3c3a4604a545cdc127456d94e421cd355bca5b528f4a9c1905b15da2eb4a4c6b", "size": 16724 }, { "mediaType": "application/vnd.oci.image.layer.v1.tar+gzip", "digest": "sha256:ec4b8955958665577945c89419d1af06b5f7636b4ac3da7f12184802ad867736", "size": 73109 } ], "subject": { "mediaType": "application/vnd.oci.image.manifest.v1+json", "digest": "sha256:5b0bcabd1ed22e9fb1310cf6c2dec7cdef19f0ad69efa1f392e94a4333501270", "size": 7682 }, "annotations": { "com.example.key1": "value1", "com.example.key2": "value2" } } ``` -------------------------------- ### Example OCI Image Layer Blob Source: https://github.com/opencontainers/image-spec/blob/main/image-layout.md This example represents a gzipped tar stream, which is the content of an OCI image layer. It is typically a compressed archive containing the filesystem changes for that layer. ```shell $ cat ./blobs/sha256/9834876dcfb05cb167a5c24953eba58c4ac89b1adf57f28f2f9d09af107ee8f0 [gzipped tar stream] ``` -------------------------------- ### Example Layer with Explicit Whiteouts Source: https://github.com/opencontainers/image-spec/blob/main/layer.md Shows how explicit whiteout files are used to mark paths for deletion in the next layer. ```text .wh.file1 a/.wh.file2 .wh.b file4 ``` -------------------------------- ### Example Layer with Explicit Whiteouts for Directory Deletion Source: https://github.com/opencontainers/image-spec/blob/main/layer.md Shows the equivalent representation of an opaque whiteout using individual explicit whiteout files for each entry within a directory. ```text bin/ .wh.my-app-binary .wh.my-app-tools .wh.tools ``` -------------------------------- ### Example OCI Image Layout Directory Structure Source: https://github.com/opencontainers/image-spec/blob/main/image-layout.md This shell command shows the typical file structure of an OCI image layout directory. It includes the index.json, oci-layout file, and blobs organized by hash algorithm. ```shell $ cd example.com/app/ $ find . -type f ./index.json ./oci-layout ./blobs/sha256/3588d02542238316759cbf24502f4344ffcc8a60c803870022f335d1390c13b4 ./blobs/sha256/4b0bc1c4050b03c95ef2a8e36e25feac42fd31283e8c30b3ee5df6b043155d3c ./blobs/sha256/7968321274dc6b6171697c33df7815310468e694ac5be0ec03ff053bb135e768 ``` -------------------------------- ### OCI Content Descriptor Example Source: https://github.com/opencontainers/image-spec/blob/main/descriptor.md A basic OCI content descriptor for an image manifest. It includes the media type, size, and SHA-256 digest. ```json { "mediaType": "application/vnd.oci.image.manifest.v1+json", "size": 7682, "digest": "sha256:5b0bcabd1ed22e9fb1310cf6c2dec7cdef19f0ad69efa1f392e94a4333501270" } ``` -------------------------------- ### OCI Image Index for Multiple Platforms Source: https://github.com/opencontainers/image-spec/blob/main/image-index.md An example of an OCI image index that references manifests for two different platforms (PPC64LE and AMD64). This structure is useful for distributing container images that need to run on various architectures. ```json { "schemaVersion": 2, "mediaType": "application/vnd.oci.image.index.v1+json", "manifests": [ { "mediaType": "application/vnd.oci.image.manifest.v1+json", "size": 7143, "digest": "sha256:e692418e4cbaf90ca69d05a66403747baa33ee08806650b51fab815ad7fc331f", "platform": { "architecture": "ppc64le", "os": "linux" } }, { "mediaType": "application/vnd.oci.image.manifest.v1+json", "size": 7682, "digest": "sha256:5b0bcabd1ed22e9fb1310cf6c2dec7cdef19f0ad69efa1f392e94a4333501270", "platform": { "architecture": "amd64", "os": "linux" } } ], "annotations": { "com.example.key1": "value1", "com.example.key2": "value2" } } ``` -------------------------------- ### OCI Image Index with Multiple Media Types Source: https://github.com/opencontainers/image-spec/blob/main/image-index.md An example of an OCI image index that includes manifests with different media types. This demonstrates flexibility in referencing various types of artifacts within a single index. ```json { "schemaVersion": 2, "mediaType": "application/vnd.oci.image.index.v1+json", "manifests": [ { "mediaType": "application/vnd.oci.image.manifest.v1+json", "size": 7143, "digest": "sha256:e692418e4cbaf90ca69d05a66403747baa33ee08806650b51fab815ad7fc331f", "platform": { "architecture": "ppc64le", "os": "linux" } }, { "mediaType": "application/vnd.oci.image.index.v1+json", "size": 7682, "digest": "sha256:601570aaff1b68a61eb9c85b8beca1644e698003e0cdb5bce960f193d265a8b7" } ], "annotations": { "com.example.key1": "value1", "com.example.key2": "value2" } } ``` -------------------------------- ### OCI Layout Header Example Source: https://github.com/opencontainers/image-spec/blob/main/image-layout.md This JSON object serves as the header for an OCI image layout, specifying the imageLayoutVersion. It indicates the version of the OCI Image Specification that the layout adheres to. ```json { "imageLayoutVersion": "1.0.0" } ``` -------------------------------- ### OCI Image Index Example Source: https://github.com/opencontainers/image-spec/blob/main/image-layout.md This JSON structure represents an OCI image index. It includes a list of manifests, each with its media type, size, digest, and optional platform and annotations. The `org.opencontainers.image.ref.name` annotation on descriptors within an index is used for named references. ```json { "schemaVersion": 2, "mediaType": "application/vnd.oci.image.index.v1+json", "manifests": [ { "mediaType": "application/vnd.oci.image.index.v1+json", "size": 7143, "digest": "sha256:0228f90e926ba6b96e4f39cf294b2586d38fbb5a1e385c05cd1ee40ea54fe7fd", "annotations": { "org.opencontainers.image.ref.name": "stable-release" } }, { "mediaType": "application/vnd.oci.image.manifest.v1+json", "size": 7143, "digest": "sha256:e692418e4cbaf90ca69d05a66403747baa33ee08806650b51fab815ad7fc331f", "platform": { "architecture": "ppc64le", "os": "linux" }, "annotations": { "org.opencontainers.image.ref.name": "v1.0" } }, { "mediaType": "application/xml", "size": 7143, "digest": "sha256:b3d63d132d21c3ff4c35a061adf23cf43da8ae054247e32faa95494d904a007e", "annotations": { "org.freedesktop.specifications.metainfo.version": "1.0", "org.freedesktop.specifications.metainfo.type": "AppStream" } } ], "annotations": { "com.example.index.revision": "r124356" } } ``` -------------------------------- ### Filter Changelog Lines Source: https://github.com/opencontainers/image-spec/blob/main/RELEASES.md Removes lines starting with 'M', 'A', or 'D' from the changelog, which indicate commit status changes. ```vim :%!grep -vE '(^M|^A|^D)' ``` -------------------------------- ### Example OCI Image Configuration Blob Source: https://github.com/opencontainers/image-spec/blob/main/image-layout.md This JSON object represents the configuration of an OCI image, including details such as architecture, author, environment variables, and the base image digest. It is essential for understanding the image's runtime environment. ```shell $ cat ./blobs/sha256/5b0bcabd1ed22e9fb1310cf6c2dec7cdef19f0ad69efa1f392e94a4333501270 | jq { "architecture": "amd64", "author": "Alyssa P. Hacker ", "config": { "Hostname": "8dfe43d80430", "Domainname": "", "User": "", "AttachStdin": false, "AttachStdout": false, "AttachStderr": false, "Tty": false, "OpenStdin": false, "StdinOnce": false, "Env": [ "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" ], "Cmd": null, "Image": "sha256:6986ae504bbf843512d680cc959484452034965db15f75ee8bdd1b107f61500b", ... ``` -------------------------------- ### OCI Empty Descriptor Example Source: https://github.com/opencontainers/image-spec/blob/main/manifest.md A descriptor for an artifact with no associated content, using the media type 'application/vnd.oci.empty.v1+json'. This is guidance for implementations where empty blobs are not universally supported. The 'data' field is optional and contains the base64 encoding of '{}'. ```json { "mediaType": "application/vnd.oci.empty.v1+json", "digest": "sha256:44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a", "size": 2, "data": "e30=" } ``` -------------------------------- ### Get Date for One Week From Now Source: https://github.com/opencontainers/image-spec/blob/main/RELEASES.md Calculates the date one week from the current date in UTC. This is used in the release email subject line. ```bash TZ=UTC date --date='next week' ``` -------------------------------- ### Copy Filesystem Snapshot with cp Source: https://github.com/opencontainers/image-spec/blob/main/layer.md Use `cp -a` to create an exact copy of a root filesystem, preserving file attributes. This is a common method for initializing a layer's base. ```bash cp -a rootfs-c9d-v1/ rootfs-c9d-v1.s1/ ``` -------------------------------- ### Initialize Go Workspaces Source: https://github.com/opencontainers/image-spec/blob/main/HACKING.md Initialize a Go workspace to manage dependencies across multiple modules, useful when developing features spanning `specs-go` and `schema` without committing changes. ```shell go work init . schema ``` -------------------------------- ### Check License Headers Source: https://github.com/opencontainers/image-spec/blob/main/HACKING.md Verify that all source code files include the necessary license headers. ```shell make check-license ``` -------------------------------- ### Equivalent Layer with Opaque Whiteout (Different Order) Source: https://github.com/opencontainers/image-spec/blob/main/layer.md Demonstrates that the order of whiteout files and new content in a layer does not affect the outcome, as the opaque whiteout is processed first. ```text a/ a/b/ a/b/c/ a/b/c/foo a/.wh..wh..opq ``` -------------------------------- ### Execute Go Tests Source: https://github.com/opencontainers/image-spec/blob/main/HACKING.md Run all Go-based tests included in the project. ```shell make test ``` -------------------------------- ### Generate Documentation Source: https://github.com/opencontainers/image-spec/blob/main/HACKING.md Generate PDF and HTML versions of the OCI image specification documentation. Requires Docker. ```shell make docs ``` -------------------------------- ### Copy Filesystem Snapshot with rsync Source: https://github.com/opencontainers/image-spec/blob/main/layer.md Use `rsync -aHAX` to create a snapshot of a root filesystem, preserving attributes, ACLs, extended attributes, and times. This is an efficient method for creating copies. ```bash rsync -aHAX rootfs-c9d-v1/ rootfs-c9d-v1.s1/ ``` -------------------------------- ### Copy Filesystem Snapshot with tar Source: https://github.com/opencontainers/image-spec/blob/main/layer.md Use `tar` to create a snapshot of a root filesystem, preserving ACLs and extended attributes. This method involves creating a new directory and piping tar archives. ```bash mkdir rootfs-c9d-v1.s1 && tar --acls --xattrs -C rootfs-c9d-v1/ -c . | tar -C rootfs-c9d-v1.s1/ --acls --xattrs -x ``` -------------------------------- ### Checkout Release Tag Source: https://github.com/opencontainers/image-spec/blob/main/RELEASES.md Checks out the git tag corresponding to the release version to prepare release documentation. ```bash git checkout $version ``` -------------------------------- ### Populated Initial Filesystem Structure Source: https://github.com/opencontainers/image-spec/blob/main/layer.md Shows a populated directory structure for a layer's root filesystem, including configuration and binary files. This structure is typically archived into a tar format. ```text rootfs-c9d-v1/ etc/ my-app-config bin/ my-app-binary my-app-tools ``` -------------------------------- ### Run Go Linters Source: https://github.com/opencontainers/image-spec/blob/main/HACKING.md Execute `golangci-lint` to check for linting violations in the Go source code beyond standard compiler checks. ```shell make lint ``` -------------------------------- ### Create PNG Images from Dot Files Source: https://github.com/opencontainers/image-spec/blob/main/HACKING.md Generate PNG image files from DOT source files located in the `img` directory. Requires Graphviz. ```shell make img/media-types.png ``` -------------------------------- ### Push Tags to Remote Source: https://github.com/opencontainers/image-spec/blob/main/RELEASES.md Pushes all local tags to the remote repository. ```bash git push --tags ``` -------------------------------- ### Format JSON Schema Files Source: https://github.com/opencontainers/image-spec/blob/main/HACKING.md Auto-format all JSON files in the `schema` directory using the `jq` tool. Requires `jq` version 1.5 or higher. ```shell make fmt ``` -------------------------------- ### Rename Documentation Files Source: https://github.com/opencontainers/image-spec/blob/main/RELEASES.md Renames the generated documentation files to include the specific release version. ```bash mv output/oci-image-spec.pdf output/oci-image-spec-$version.pdf ``` -------------------------------- ### Minimal Artifact Manifest Source: https://github.com/opencontainers/image-spec/blob/main/manifest.md Use this manifest when the artifact consists of no files or blobs. It requires specifying `artifactType` and setting `config` and `layers` to the empty descriptor value. ```json { "schemaVersion": 2, "mediaType": "application/vnd.oci.image.manifest.v1+json", "artifactType": "application/vnd.example+type", "config": { "mediaType": "application/vnd.oci.empty.v1+json", "digest": "sha256:44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a", "size": 2 }, "layers": [ { "mediaType": "application/vnd.oci.empty.v1+json", "digest": "sha256:44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a", "size": 2 } ], "annotations": { "oci.opencontainers.image.created": "2023-01-02T03:04:05Z", "com.example.data": "payload" } } ``` -------------------------------- ### Generate Changelog with Git Log Source: https://github.com/opencontainers/image-spec/blob/main/RELEASES.md Use this command to generate a raw changelog from git history between two tags. Review the output for commit impact and formatting. ```bash git log --oneline --no-merges --decorate --name-status v1.0.1..HEAD | vim - ``` -------------------------------- ### EBNF for Path and Component Source: https://github.com/opencontainers/image-spec/blob/main/considerations.md Defines a simple relative path name using EBNF notation. 'component' matches one or more lowercase letters, and 'path' matches one or more components separated by slashes. ```ebnf path ::= component ("/" component)* component ::= [a-z]+ ``` -------------------------------- ### Digest Calculation Pseudocode Source: https://github.com/opencontainers/image-spec/blob/main/descriptor.md Illustrates the process of calculating and verifying a content digest. It shows how to derive the digest from content bytes and compare it with a reference digest. ```text let ID(C) = Descriptor.digest let C = let D = ':' + Encode(H(C)) let verified = ID(C) == D ``` ```text D == ID(C) == ':' + Encode(H(C)) ``` -------------------------------- ### Verifying Blob Content with SHA256 Source: https://github.com/opencontainers/image-spec/blob/main/image-layout.md This shell command demonstrates how to verify the content of a blob file against its expected SHA256 digest. The filename in the blobs directory should match the computed hash. ```shell $ shasum -a 256 ./blobs/sha256/afff3924849e458c5ef237db5f89539274d5e609db5db935ed3959c90f1f2d51 afff3924849e458c5ef237db5f89539274d5e609db5db935ed3959c90f1f2d51 ./blobs/sha256/afff3924849e458c5ef237db5f89539274d5e609db5db935ed3959c90f1f2d51 ``` -------------------------------- ### Tar Archive Entries for Populated Filesystem Source: https://github.com/opencontainers/image-spec/blob/main/layer.md Lists the relative path entries that would be included in a tar archive for the populated filesystem. This is how the layer's content is stored. ```text ./ ./etc/ ./etc/my-app-config ./bin/ ./bin/my-app-binary ./bin/my-app-tools ``` -------------------------------- ### Tag Release Commit Source: https://github.com/opencontainers/image-spec/blob/main/RELEASES.md Creates a signed git tag for the release at the specified version bump commit. ```bash git tag -s $version $versionBumpCommit ``` -------------------------------- ### Artifact Manifest With Config Blob Source: https://github.com/opencontainers/image-spec/blob/main/manifest.md Use this manifest for artifacts that include a configuration blob. Specify `artifactType` for tooling compatibility, define the `config` with artifact metadata, and include the artifact content in the `layers`. ```json { "schemaVersion": 2, "mediaType": "application/vnd.oci.image.manifest.v1+json", "artifactType": "application/vnd.example+type", "config": { "mediaType": "application/vnd.example.config.v1+json", "digest": "sha256:5891b5b522d5df086d0ff0b110fbd9d21bb4fc7163af34d08286a2e846f6be03", "size": 123 }, "layers": [ { "mediaType": "application/vnd.example.data.v1.tar+gzip", "digest": "sha256:e258d248fda94c63753607f7c4494ee0fcbe92f1a76bfdac795c9d84101eb317", "size": 1234 } ] } ``` -------------------------------- ### Deriving Hardlinks from Directory Structure Source: https://github.com/opencontainers/image-spec/blob/main/layer.md This pseudocode outlines a method to identify and map hardlinks within a directory structure by comparing file inode and device information. It's useful for generating layer changesets that accurately represent hardlinked files. ```pseudocode SET LinkMap to map[< Major:Minor String >]map[< inode integer >]< path string > SET LinkNames to map[< src path string >]< dest path string > FOR each path in root path IF path type is directory CONTINUE ENDIF SET filestat to stat(path) IF filestat num of links == 1 CONTINUE ENDIF IF LinkMap[filestat device][filestat inode] is not empty SET LinkNames[path] to LinkMap[filestat device][filestat inode] ELSE SET LinkMap[filestat device][filestat inode] to path ENDIF END FOR ``` -------------------------------- ### Clean Build Artifacts Source: https://github.com/opencontainers/image-spec/blob/main/HACKING.md Remove all generated and compiled artifacts from the project. ```shell make clean ``` -------------------------------- ### Artifact Manifest Without Config Blob Source: https://github.com/opencontainers/image-spec/blob/main/manifest.md Use this manifest when the artifact does not require a separate configuration blob. The artifact content is included in the `layers`, and `config` is set to the empty descriptor value. ```json { "schemaVersion": 2, "mediaType": "application/vnd.oci.image.manifest.v1+json", "artifactType": "application/vnd.example+type", "config": { "mediaType": "application/vnd.oci.empty.v1+json", "digest": "sha256:44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a", "size": 2 }, "layers": [ { "mediaType": "application/vnd.example+type", "digest": "sha256:e258d248fda94c63753607f7c4494ee0fcbe92f1a76bfdac795c9d84101eb317", "size": 1234 } ] } ``` -------------------------------- ### Expanded ChainID Calculation Source: https://github.com/opencontainers/image-spec/blob/main/config.md Shows the fully expanded calculation of ChainID for layers A, B, and C, demonstrating how it resolves to a single digest based on the individual layer DiffIDs and their order. ```text ChainID(A|B|C) = Digest(Digest(DiffID(A) + " " + DiffID(B)) + " " + DiffID(C)) ``` -------------------------------- ### EBNF Repetition Operators Source: https://github.com/opencontainers/image-spec/blob/main/considerations.md Uses postfix operators '*' and '+' to define repetition of preceding expressions. '*' allows zero or more matches, '+' requires one or more. ```ebnf zeroormore ::= expression* oneormore ::= expression+ ``` -------------------------------- ### OCI Content Descriptor with URLs Source: https://github.com/opencontainers/image-spec/blob/main/descriptor.md An OCI content descriptor that specifies URLs for retrieving the referenced content. This is useful when content is not directly embedded or available via a digest alone. ```json { "mediaType": "application/vnd.oci.image.manifest.v1+json", "size": 7682, "digest": "sha256:5b0bcabd1ed22e9fb1310cf6c2dec7cdef19f0ad69efa1f392e94a4333501270", "urls": [ "https://example.com/example-manifest" ] } ``` -------------------------------- ### Tar Archive Entries for Changeset Source: https://github.com/opencontainers/image-spec/blob/main/layer.md This represents the entries in a tar archive that signifies a changeset. It includes added files, directories, and whiteout files for deletions. ```text ./etc/my-app.d/ ./etc/my-app.d/default.cfg ./bin/my-app-tools ./etc/.wh.my-app-config ``` -------------------------------- ### Format Pull Request in Changelog Source: https://github.com/opencontainers/image-spec/blob/main/RELEASES.md This vim command reformats lines containing pull request references to match the desired format, moving the PR number to the end. ```vim :% s/(pr\/\(\d*\))\(.*\)/\2 (#\1)/ ``` -------------------------------- ### Regular Expression for Path Matching Source: https://github.com/opencontainers/image-spec/blob/main/considerations.md Converts the EBNF definition of a path into a regular expression. This expression matches one or more lowercase letters, optionally followed by slash-separated groups of one or more lowercase letters. ```regex [a-z]+(?:/[a-z]+)* ``` -------------------------------- ### EBNF Grouping Expression Source: https://github.com/opencontainers/image-spec/blob/main/considerations.md Groups multiple expressions together using parentheses. Allows operators to be applied to the entire group. ```ebnf group ::= (A B) ``` -------------------------------- ### ChainID Calculation Formula Source: https://github.com/opencontainers/image-spec/blob/main/config.md Illustrates the recursive definition of ChainID for a sequence of layers A, B, and C. This formula ensures that the identifier is dependent on the order of layer application. ```text ChainID(A) = DiffID(A) ChainID(A|B) = Digest(ChainID(A) + " " + DiffID(B)) ChainID(A|B|C) = Digest(ChainID(A|B) + " " + DiffID(C)) ``` -------------------------------- ### Count Merged PRs for Release Email Source: https://github.com/opencontainers/image-spec/blob/main/RELEASES.md Counts the number of merged pull requests between a prior tag and the current version bump commit. This is used to inform the release email. ```bash git log --pretty=oneline --no-merges --decorate $priorTag..$versionBumpCommit | grep \(pr\/ | wc -l ```