From 5511a6bc713519527ee47281361922c6256b5834 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tam=C3=A1s=20G=C3=A9rczei?= Date: Wed, 13 Jan 2021 21:22:20 +0100 Subject: [PATCH] added image labels --- Containerfile | 12 ++++++++++++ hooks/build | 2 ++ 2 files changed, 14 insertions(+) create mode 100644 hooks/build diff --git a/Containerfile b/Containerfile index 795da6d..9563f32 100644 --- a/Containerfile +++ b/Containerfile @@ -16,6 +16,18 @@ RUN apk --update --no-cache add build-base && \ find /tmp/wheels -type f -name '*.whl' | xargs -I{} cp -v {} /wheels/ FROM python:3.7-alpine + +ARG BUILD_DATE + +LABEL org.opencontainers.image.title="py-air-control-exporter" +LABEL org.opencontainers.image.description="Exports Prometheus metrics from Philips smart air purifier devices." +LABEL org.opencontainers.image.version="0.3.0" +LABEL org.opencontainers.image.url="https://github.com/urbas/py-air-control-exporter" +LABEL org.opencontainers.image.authors="Tamás Gérczei " +LABEL org.opencontainers.image.created="${BUILD_DATE}" +LABEL org.opencontainers.image.source="https://github.com/tgerczei/contain-air" +LABEL org.opencontainers.image.vendor="Gérczei Tamás E.V." + COPY --from=builder /wheels /packages RUN python -m pip install --no-cache-dir --no-index --find-links=packages/ \ diff --git a/hooks/build b/hooks/build new file mode 100644 index 0000000..5470092 --- /dev/null +++ b/hooks/build @@ -0,0 +1,2 @@ +#!/bin/bash +docker build --build-arg BUILD_DATE=$(date -u +%Y-%m-%dT%H:%M:%SZ) -t $IMAGE_NAME .