From 565c7b5bc0dbcd755edc52bb59dbf481e3566418 Mon Sep 17 00:00:00 2001 From: Martin Reinhardt Date: Tue, 31 Oct 2023 08:59:54 +0100 Subject: [PATCH] chore: Using OCI default labels see https://github.com/opencontainers/image-spec/blob/main/annotations.md --- Dockerfile | 11 ++++++++++- Dockerfile.minimal | 11 ++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index d9e3f64..2e2c8b2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,7 +25,16 @@ RUN set -ex \ FROM alpine:latest -LABEL maintainer "Knut Ahlers " +ARG BUILD_DATE +ARG APP_VERSION + +LABEL org.opencontainers.image.authors='Knut Ahlers ' \ + org.opencontainers.image.created=$BUILD_DATE \ + org.opencontainers.image.version=$APP_VERSION \ + org.opencontainers.image.url='https://hub.docker.com/r/luzifer/ots/' \ + org.opencontainers.image.documentation='https://github.com/Luzifer/ots/wiki' \ + org.opencontainers.image.source='https://github.com/Luzifer/ots' \ + org.opencontainers.image.licenses='Apache-2.0' RUN set -ex \ && apk --no-cache add \ diff --git a/Dockerfile.minimal b/Dockerfile.minimal index e4206a4..50032a3 100644 --- a/Dockerfile.minimal +++ b/Dockerfile.minimal @@ -25,7 +25,16 @@ RUN set -ex \ FROM scratch -LABEL maintainer "Knut Ahlers " +ARG BUILD_DATE +ARG APP_VERSION + +LABEL org.opencontainers.image.authors='Knut Ahlers ' \ + org.opencontainers.image.created=$BUILD_DATE \ + org.opencontainers.image.version $APP_VERSION \ + org.opencontainers.image.url='https://hub.docker.com/r/luzifer/ots/' \ + org.opencontainers.image.documentation='https://github.com/Luzifer/ots/wiki' \ + org.opencontainers.image.source='https://github.com/Luzifer/ots' \ + org.opencontainers.image.licenses='Apache-2.0' COPY --from=builder /go/bin/ots /usr/local/bin/ots