From 220fe3d4c923d38b32c78f016eb0da82d63f39ab Mon Sep 17 00:00:00 2001 From: Stefan Allius Date: Wed, 17 Apr 2024 22:05:24 +0200 Subject: [PATCH] adapt container informations --- app/Dockerfile | 3 ++- app/build.sh | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/app/Dockerfile b/app/Dockerfile index 6b796c1..30cdae8 100644 --- a/app/Dockerfile +++ b/app/Dockerfile @@ -71,8 +71,9 @@ ENTRYPOINT ["/root/entrypoint.sh"] CMD [ "python3", "./server.py" ] +LABEL org.opencontainers.image.title="TSUN Gen3 Proxy" LABEL org.opencontainers.image.authors="Stefan Allius" LABEL org.opencontainers.image.source https://github.com/s-allius/tsun-gen3-proxy -LABEL org.opencontainers.image.description 'The "TSUN Gen3 Micro-Inverter" proxy enables a reliable connection between TSUN third generation inverters and an MQTT broker to integrate the inverter into typical home automations' +LABEL org.opencontainers.image.description 'This proxy enables a reliable connection between TSUN third generation inverters (eg. TSOL MS600, MS800, MS2000) and an MQTT broker to integrate the inverter into typical home automations.' LABEL org.opencontainers.image.licenses="BSD-3-Clause" LABEL org.opencontainers.image.vendor="Stefan Allius" diff --git a/app/build.sh b/app/build.sh index bb89cfa..ac8879d 100755 --- a/app/build.sh +++ b/app/build.sh @@ -20,7 +20,7 @@ IMAGE=tsun-gen3-proxy if [[ $1 == dev ]] || [[ $1 == rc ]] ;then IMAGE=docker.io/sallius/${IMAGE} -VERSION=${VERSION}-$1-${BRANCH} +VERSION=${VERSION} elif [[ $1 == rel ]];then IMAGE=ghcr.io/s-allius/${IMAGE} else @@ -31,11 +31,11 @@ fi echo version: $VERSION build-date: $BUILD_DATE image: $IMAGE if [[ $1 == dev ]];then -docker build --build-arg "VERSION=${VERSION}" --build-arg environment=dev --build-arg "LOG_LVL=DEBUG" --label "org.label-schema.build-date=${BUILD_DATE}" --label "org.opencontainers.image.version=${VERSION}" -t ${IMAGE}:latest app +docker build --build-arg "VERSION=${VERSION}" --build-arg environment=dev --build-arg "LOG_LVL=DEBUG" --label "org.opencontainers.image.created=${BUILD_DATE}" --label "org.opencontainers.image.version=${VERSION}" --label "org.opencontainers.image.revision=${BRANCH}" -t ${IMAGE}:latest app elif [[ $1 == rc ]];then -docker build --build-arg "VERSION=${VERSION}" --build-arg environment=production --label "org.label-schema.build-date=${BUILD_DATE}" --label "org.opencontainers.image.version=${VERSION}" -t ${IMAGE}:latest app +docker build --build-arg "VERSION=${VERSION}" --build-arg environment=production --label "org.opencontainers.image.created=${BUILD_DATE}" --label "org.opencontainers.image.version=${VERSION}" --label "org.opencontainers.image.revision=${BRANCH}" -t ${IMAGE}:latest app elif [[ $1 == rel ]];then -docker build --no-cache --build-arg "VERSION=${VERSION}" --build-arg environment=production --label "org.label-schema.build-date=${BUILD_DATE}" --label "org.opencontainers.image.version=${VERSION}" -t ${IMAGE}:latest -t ${IMAGE}:${MAJOR} -t ${IMAGE}:${VERSION} app +docker build --no-cache --build-arg "VERSION=${VERSION}" --build-arg environment=production --label "org.opencontainers.image.created=${BUILD_DATE}" --label "org.opencontainers.image.version=${VERSION}" --label "org.opencontainers.image.revision=${BRANCH}" -t ${IMAGE}:latest -t ${IMAGE}:${MAJOR} -t ${IMAGE}:${VERSION} app echo 'login to ghcr.io' echo $GHCR_TOKEN | docker login ghcr.io -u s-allius --password-stdin docker push ghcr.io/s-allius/tsun-gen3-proxy:latest