Add org.opencontainers.image.* labels to Dockerfiles
- 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.
This commit is contained in:
6 files changed
+75
-19
No files matched your search
+12
-2
@@ -1,7 +1,17 @@
|
||||
# This is a nearly-empty image that we use to create a data-only container for persistence
|
||||
FROM scratch
|
||||
LABEL maintainer "Weaveworks Inc <help@weave.works>"
|
||||
LABEL works.weave.role=system
|
||||
|
||||
# These labels are pretty static, and can therefore be added early on:
|
||||
LABEL works.weave.role="system" \
|
||||
maintainer="Weaveworks <help@weave.works>" \
|
||||
org.opencontainers.image.title="weavedb" \
|
||||
org.opencontainers.image.source="https://github.com/weaveworks/weave" \
|
||||
org.opencontainers.image.vendor="Weaveworks"
|
||||
|
||||
ENTRYPOINT ["data-only"]
|
||||
# Work round Docker refusing to save an empty image
|
||||
COPY Dockerfile /
|
||||
|
||||
# This label will change for every build, and should therefore be the last layer of the image:
|
||||
ARG revision
|
||||
LABEL org.opencontainers.image.revision="${revision}"
|
||||
Reference in new issue
Block a user