Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

Add org.opencontainers.image.* labels to Dockerfiles #3299

Merged
merged 1 commit into from
May 15, 2018

Conversation

marccarre
Copy link
Contributor

@marccarre marccarre commented May 14, 2018

Why? What?

Testing

$ docker inspect weaveworks/weave
[
    {
        [...]
        "ContainerConfig": {
            [...]
            "Labels": {
                "maintainer": "Weaveworks <help@weave.works>",
                "org.label-schema.description": "Weave Net creates a virtual network that connects Docker containers across multiple hosts and enables their automatic discovery",
                "org.label-schema.name": "Weave Net",
                "org.label-schema.schema-version": "1.0",
                "org.label-schema.url": "https://weave.works",
                "org.label-schema.vcs-ref": "9f207f161a160e1f09f472015c346976547a0dc7",
                "org.label-schema.vcs-url": "https://github.com/weaveworks/weave",
                "org.label-schema.vendor": "Weaveworks",
                "org.opencontainers.image.description": "Weave Net creates a virtual network that connects Docker containers across multiple hosts and enables their automatic discovery",
                "org.opencontainers.image.revision": "9f207f161a160e1f09f472015c346976547a0dc7",
                "org.opencontainers.image.source": "https://github.com/weaveworks/weave",
                "org.opencontainers.image.title": "Weave Net",
                "org.opencontainers.image.url": "https://weave.works",
                "org.opencontainers.image.vendor": "Weaveworks",
                "works.weave.role": "system"
            }
[...]
$ docker inspect weaveworks/weave-kube
[
    {
        [...]
        "ContainerConfig": {
            [...]
            "Labels": {
                "maintainer": "Weaveworks <help@weave.works>",
                "org.label-schema.description": "Weave Net creates a virtual network that connects Docker containers across multiple hosts and enables their automatic discovery",
                "org.label-schema.name": "Weave Net",
                "org.label-schema.schema-version": "1.0",
                "org.label-schema.url": "https://weave.works",
                "org.label-schema.vcs-ref": "9f207f161a160e1f09f472015c346976547a0dc7",
                "org.label-schema.vcs-url": "https://github.com/weaveworks/weave",
                "org.label-schema.vendor": "Weaveworks",
                "org.opencontainers.image.description": "Weave Net creates a virtual network that connects Docker containers across multiple hosts and enables their automatic discovery",
                "org.opencontainers.image.revision": "9f207f161a160e1f09f472015c346976547a0dc7",
                "org.opencontainers.image.source": "https://github.com/weaveworks/weave",
                "org.opencontainers.image.title": "weave-kube",
                "org.opencontainers.image.url": "https://weave.works",
                "org.opencontainers.image.vendor": "Weaveworks",
                "works.weave.role": "system"
            }
[...]

Copy link
Contributor

@leth leth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

- This should ultimately help for image-to-code back references.
- `org.label-schema.*` labels are now deprecated, in favour of `org.opencontainers.image.*` labels.
  See also: https://github.com/opencontainers/image-spec/blob/master/annotations.md#back-compatibility-with-label-schema
- Git revision is now injected at `docker build` time.
@marccarre marccarre force-pushed the add-opencontainers-labels-to-dockerfiles branch from 6805844 to 9f207f1 Compare May 14, 2018 10:51
@marccarre marccarre merged commit dbcc72a into 2.3 May 15, 2018
@marccarre marccarre deleted the add-opencontainers-labels-to-dockerfiles branch May 15, 2018 08:44
@brb brb added this to the 2.4 milestone Jul 24, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants