项目作者: freight-trust

项目描述 :
Internal Corporate Schemas
高级语言:
项目地址: git://github.com/freight-trust/schema.git
创建时间: 2020-07-17T19:41:35Z
项目社区:https://github.com/freight-trust/schema

开源协议:MIT License

下载


  1. org.label-schema.build-date=$BUILD_DATE \
  2. org.label-schema.name="@freight-trust/$APPLICATIONh" \
  3. org.label-schema.description="Freight Trust & Clearing Corporation" \
  4. org.label-schema.url="https://schema.freighttrust.com/" \
  5. org.label-schema.vcs-ref=$VCS_REF \
  6. org.label-schema.vcs-url="https://github.com/freight-trust/$VCS_URL" \
  7. org.label-schema.vendor="Freight Trust & Clearing" \
  8. org.label-schema.version=$VERSION \
  9. org.label-schema.schema-version="1.0"
  10.  

vcs-refs
commit id of when your image was built

build-date
timestamp of when image was built your image

Annotations

source

Several components of the specification, like Image Manifests and Descriptors, feature an optional annotations property, whose format is common and defined in this section.

This property contains arbitrary metadata.

Rules

  • Annotations MUST be a key-value map where both the key and value MUST be strings.
  • While the value MUST be present, it MAY be an empty string.
  • Keys MUST be unique within this map, and best practice is to namespace the keys.
  • Keys SHOULD be named using a reverse domain notation - e.g. com.example.myKey.
  • The prefix org.opencontainers is reserved for keys defined in Open Container Initiative (OCI) specifications and MUST NOT be used by other specifications and extensions.
  • Keys using the org.opencontainers.image namespace are reserved for use in the OCI Image Specification and MUST NOT be used by other specifications and extensions, including other OCI specifications.
  • If there are no annotations then this property MUST either be absent or be an empty map.
  • Consumers MUST NOT generate an error if they encounter an unknown annotation key.

Pre-Defined Annotation Keys

This specification defines the following annotation keys, intended for but not limited to image index and image manifest authors:

  • org.opencontainers.image.created date and time on which the image was built (string, date-time as defined by RFC 3339).
  • org.opencontainers.image.authors contact details of the people or organization responsible for the image (freeform string)
  • org.opencontainers.image.url URL to find more information on the image (string)
  • org.opencontainers.image.documentation URL to get documentation on the image (string)
  • org.opencontainers.image.source URL to get source code for building the image (string)
  • org.opencontainers.image.version version of the packaged software
  • org.opencontainers.image.revision Source control revision identifier for the packaged software.
  • org.opencontainers.image.vendor Name of the distributing entity, organization or individual.
  • org.opencontainers.image.licenses License(s) under which contained software is distributed as an SPDX License Expression.
  • org.opencontainers.image.ref.name Name of the reference for a target (string).
    • SHOULD only be considered valid when on descriptors on index.json within image layout.
    • Character set of the value SHOULD conform to alphanum of A-Za-z0-9 and separator set of -._:@/+
    • The reference must match the following grammar:
      1. ref ::= component ("/" component)*
      2. component ::= alphanum (separator alphanum)*
      3. alphanum ::= [A-Za-z0-9]+
      4. separator ::= [-._:@+] | "--"
  • org.opencontainers.image.title Human-readable title of the image (string)
  • org.opencontainers.image.description Human-readable description of the software packaged in the image (string)

Back-compatibility with Label Schema

Label Schema defined a number of conventional labels for container images, and these are now superceded by annotations with keys starting org.opencontainers.image.

While users are encouraged to use the org.opencontainers.image keys, tools MAY choose to support compatible annotations using the org.label-schema prefix as follows.

org.opencontainers.image prefix org.label-schema prefix Compatibility notes
created build-date Compatible
url url Compatible
source vcs-url Compatible
version version Compatible
revision vcs-ref Compatible
vendor vendor Compatible
title name Compatible
description description Compatible
documentation usage Value is compatible if the documentation is located by a URL
authors No equivalent in Label Schema
licenses No equivalent in Label Schema
ref.name No equivalent in Label Schema
schema-version No equivalent in the OCI Image Spec
docker.*, rkt.* No equivalent in the OCI Image Spec

OCI Image Manifest Specification

There are three main goals of the Image Manifest Specification.
The first goal is content-addressable images, by supporting an image model where the image’s configuration can be hashed to generate a unique ID for the image and its components.
The second goal is to allow multi-architecture images, through a “fat manifest” which references image manifests for platform-specific versions of an image.
In OCI, this is codified in an image index.
The third goal is to be translatable to the OCI Runtime Specification.

This section defines the application/vnd.oci.image.manifest.v1+json media type.
For the media type(s) that this is compatible with see the matrix.

Image Manifest

Unlike the image index, which contains information about a set of images that can span a variety of architectures and operating systems, an image manifest provides a configuration and set of layers for a single container image for a specific architecture and operating system.

Image Manifest Property Descriptions

  1. Entries in this field will frequently use the `+gzip` types.

Example Image Manifest

Example showing an image manifest:

  1. {
  2. "schemaVersion": 2,
  3. "config": {
  4. "mediaType": "application/vnd.oci.image.config.v1+json",
  5. "size": 7023,
  6. "digest": "sha256:b5b2b2c507a0944348e0303114d8d93aaaa081732b86451d9bce1f432a537bc7"
  7. },
  8. "layers": [
  9. {
  10. "mediaType": "application/vnd.oci.image.layer.v1.tar+gzip",
  11. "size": 32654,
  12. "digest": "sha256:9834876dcfb05cb167a5c24953eba58c4ac89b1adf57f28f2f9d09af107ee8f0"
  13. },
  14. {
  15. "mediaType": "application/vnd.oci.image.layer.v1.tar+gzip",
  16. "size": 16724,
  17. "digest": "sha256:3c3a4604a545cdc127456d94e421cd355bca5b528f4a9c1905b15da2eb4a4c6b"
  18. },
  19. {
  20. "mediaType": "application/vnd.oci.image.layer.v1.tar+gzip",
  21. "size": 73109,
  22. "digest": "sha256:ec4b8955958665577945c89419d1af06b5f7636b4ac3da7f12184802ad867736"
  23. }
  24. ],
  25. "annotations": {
  26. "com.example.key1": "value1",
  27. "com.example.key2": "value2"
  28. }
  29. }