Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

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

Merged
merged 1 commit into from
May 11, 2018

Conversation

marccarre
Copy link
Contributor

Why? What?

Testing

$ docker inspect quay.io/weaveworks/flux
[
    {
        [...]
        "ContainerConfig": {
            [...]
            "Labels": {
                "maintainer": "Weaveworks <[email protected]>",
                "org.label-schema.build-date": "2018-05-11T13:56:53Z",
                "org.label-schema.description": "The Flux daemon, for synchronising your cluster with a git repo, and deploying new images",
                "org.label-schema.name": "flux",
                "org.label-schema.schema-version": "1.0",
                "org.label-schema.url": "https://github.com/weaveworks/flux",
                "org.label-schema.vcs-ref": "b719f6404ccc5247278d73849df1a89cf5e78b8c",
                "org.label-schema.vcs-url": "[email protected]:weaveworks/flux",
                "org.label-schema.vendor": "Weaveworks",
                "org.opencontainers.image.created": "2018-05-11T13:56:53Z",
                "org.opencontainers.image.description": "The Flux daemon, for synchronising your cluster with a git repo, and deploying new images",
                "org.opencontainers.image.revision": "b719f6404ccc5247278d73849df1a89cf5e78b8c",
                "org.opencontainers.image.source": "[email protected]:weaveworks/flux",
                "org.opencontainers.image.title": "flux",
                "org.opencontainers.image.url": "https://github.com/weaveworks/flux",
                "org.opencontainers.image.vendor": "Weaveworks"
            }
[...]

$ docker inspect quay.io/weaveworks/helm-operator
[
    {
        [...]
        "ContainerConfig": {
            [...]
            "Labels": {
                "maintainer": "Weaveworks <[email protected]>",
                "org.label-schema.build-date": "2018-05-11T13:56:53Z",
                "org.label-schema.description": "The Flux Helm operator, for releasing Helm charts according to git",
                "org.label-schema.name": "flux-helm-operator",
                "org.label-schema.schema-version": "1.0",
                "org.label-schema.url": "https://github.com/weaveworks/flux",
                "org.label-schema.vcs-ref": "b719f6404ccc5247278d73849df1a89cf5e78b8c",
                "org.label-schema.vcs-url": "[email protected]:weaveworks/flux",
                "org.label-schema.vendor": "Weaveworks",
                "org.opencontainers.image.created": "2018-05-11T13:56:53Z",
                "org.opencontainers.image.description": "The Flux Helm operator, for releasing Helm charts according to git",
                "org.opencontainers.image.revision": "b719f6404ccc5247278d73849df1a89cf5e78b8c",
                "org.opencontainers.image.source": "[email protected]:weaveworks/flux",
                "org.opencontainers.image.title": "flux-helm-operator",
                "org.opencontainers.image.url": "https://github.com/weaveworks/flux",
                "org.opencontainers.image.vendor": "Weaveworks"
            }
[...]

- 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
- `MAINTAINER` is deprecated, in favour of the `maintainer` label. Both were missing so the latter was added.
Copy link
Member

@squaremo squaremo left a comment

Choose a reason for hiding this comment

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

Nice and neat, thanks Marc 🍱

@marccarre marccarre merged commit 0af44c5 into master May 11, 2018
@marccarre marccarre deleted the add-opencontainers-labels-to-dockerfiles branch May 11, 2018 15:17
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.

2 participants