From b6f361cd3ace30a30d3ed90144c1014d48444206 Mon Sep 17 00:00:00 2001 From: Daniel Hiltgen Date: Wed, 29 Aug 2018 10:24:29 -0700 Subject: [PATCH] Add standard OCI labels This adds the standardized OCI labels for our image so downstream tools will be able to inspect/extract these mechanically. Reference: https://github.com/opencontainers/image-spec/blob/master/annotations.md#pre-defined-annotation-keys Signed-off-by: Daniel Hiltgen Upstream-commit: 58e5b9c98134930c00ad678bc0de454b490dd7b6 Component: packaging --- components/packaging/image/Dockerfile.engine | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/components/packaging/image/Dockerfile.engine b/components/packaging/image/Dockerfile.engine index 9242dcdc67..869ef14429 100644 --- a/components/packaging/image/Dockerfile.engine +++ b/components/packaging/image/Dockerfile.engine @@ -72,8 +72,21 @@ RUN . /binaries-commits && \ # Final docker image FROM scratch +ARG VERSION +ARG GITCOMMIT +ARG BUILDTIME COPY --from=dockerd-builder /sbin/dockerd /sbin/ COPY --from=proxy-builder /sbin/docker-proxy /sbin/ COPY --from=init-builder /sbin/docker-init /sbin/ COPY --from=runc-builder /usr/local/sbin/runc /sbin/ +LABEL \ + org.opencontainers.image.authors="Docker Inc." \ + org.opencontainers.image.created="${BUILDTIME}" \ + org.opencontainers.image.documentation="https://docs.docker.com/" \ + org.opencontainers.image.licenses="Apache-2.0" \ + org.opencontainers.image.revision="${GITCOMMIT}" \ + org.opencontainers.image.url="https://www.docker.com/products/docker-engine" \ + org.opencontainers.image.vendor="Docker Inc." \ + org.opencontainers.image.version="${VERSION}" + ENTRYPOINT ["/sbin/dockerd"]