Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
May 14, 2018

Conversation

marccarre
Copy link
Contributor

@marccarre marccarre commented May 14, 2018

Why? What?

Testing

$ docker inspect quay.io/weaveworks/cortex-alertmanager
[
    {
        [...]
        "ContainerConfig": {
            [...]
            "Labels": {
            "Labels": {
                "org.opencontainers.image.revision": "05830bf3a6bd0186b4ad444241084b526a7df25c",
                "org.opencontainers.image.source": "https://github.com/weaveworks/cortex/tree/master/cmd/alertmanager",
                "org.opencontainers.image.title": "alertmanager"
            }
[...]

@tomwilkie
Copy link
Contributor

Out of interest, are there any tools that actually consume these labels?

- 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 (`git rev-parse HEAD`) is now injected at `docker build` time.
- `MAINTAINER` is deprecated (in favour of the `maintainer` label).
@marccarre marccarre force-pushed the add-opencontainers-labels-to-dockerfiles branch from 12b9a09 to 05830bf Compare May 14, 2018 10:52
@marccarre
Copy link
Contributor Author

@tomwilkie, there at least the one I'm working on at the moment.

@tomwilkie
Copy link
Contributor

Looks cool!

@marccarre marccarre merged commit 4c98452 into master May 14, 2018
@marccarre marccarre deleted the add-opencontainers-labels-to-dockerfiles branch May 14, 2018 11:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants