From 5c307fbb232e482c65122dc142fcd605e6c0a0bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20=C4=8Cerm=C3=A1k?= Date: Tue, 10 Mar 2026 08:55:56 +0100 Subject: [PATCH] Remove dynamic labels from dockerfiles --- Dockerfile | 10 ---------- machine/generic-x86-64 | 13 +------------ machine/green | 13 +------------ machine/intel-nuc | 13 +------------ machine/khadas-vim3 | 13 +------------ machine/odroid-c2 | 13 +------------ machine/odroid-c4 | 13 +------------ machine/odroid-m1 | 13 +------------ machine/odroid-n2 | 13 +------------ machine/qemuarm-64 | 13 +------------ machine/qemux86-64 | 13 +------------ machine/raspberrypi3-64 | 13 +------------ machine/raspberrypi4-64 | 13 +------------ machine/raspberrypi5-64 | 13 +------------ machine/yellow | 13 +------------ script/hassfest/docker.py | 23 +---------------------- 16 files changed, 15 insertions(+), 200 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1ccbedd1caae..058a67317ac0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -51,18 +51,8 @@ RUN \ WORKDIR /config -ARG BUILD_ARCH=amd64 -ARG BUILD_DATE="1970-01-01 00:00:00+00:00" -ARG BUILD_REPOSITORY -ARG BUILD_VERSION=0.0.0-local - LABEL \ io.hass.type="core" \ - io.hass.arch="${BUILD_ARCH}" \ - io.hass.version="${BUILD_VERSION}" \ - org.opencontainers.image.created="${BUILD_DATE}" \ - org.opencontainers.image.version="${BUILD_VERSION}" \ - org.opencontainers.image.source="${BUILD_REPOSITORY}" \ org.opencontainers.image.authors="The Home Assistant Authors" \ org.opencontainers.image.description="Open-source home automation platform running on Python 3" \ org.opencontainers.image.documentation="https://www.home-assistant.io/docs/" \ diff --git a/machine/generic-x86-64 b/machine/generic-x86-64 index 5d761aaababa..bcd6a445c80b 100644 --- a/machine/generic-x86-64 +++ b/machine/generic-x86-64 @@ -7,15 +7,4 @@ FROM ${BUILD_FROM} RUN apk --no-cache add \ libva-intel-driver -ARG BUILD_ARCH=amd64 -ARG BUILD_DATE="1970-01-01 00:00:00+00:00" -ARG BUILD_REPOSITORY -ARG BUILD_VERSION=0.0.0-local - -LABEL \ - io.hass.type="core" \ - io.hass.arch="${BUILD_ARCH}" \ - io.hass.version="${BUILD_VERSION}" \ - org.opencontainers.image.created="${BUILD_DATE}" \ - org.opencontainers.image.version="${BUILD_VERSION}" \ - org.opencontainers.image.source="${BUILD_REPOSITORY}" +LABEL io.hass.type="core" diff --git a/machine/green b/machine/green index 78e1cd05fc79..ddac174f4cdf 100644 --- a/machine/green +++ b/machine/green @@ -4,15 +4,4 @@ ARG BUILD_FROM=ghcr.io/home-assistant/aarch64-homeassistant:latest FROM ${BUILD_FROM} -ARG BUILD_ARCH=aarch64 -ARG BUILD_DATE="1970-01-01 00:00:00+00:00" -ARG BUILD_REPOSITORY -ARG BUILD_VERSION=0.0.0-local - -LABEL \ - io.hass.type="core" \ - io.hass.arch="${BUILD_ARCH}" \ - io.hass.version="${BUILD_VERSION}" \ - org.opencontainers.image.created="${BUILD_DATE}" \ - org.opencontainers.image.version="${BUILD_VERSION}" \ - org.opencontainers.image.source="${BUILD_REPOSITORY}" +LABEL io.hass.type="core" diff --git a/machine/intel-nuc b/machine/intel-nuc index 5d761aaababa..bcd6a445c80b 100644 --- a/machine/intel-nuc +++ b/machine/intel-nuc @@ -7,15 +7,4 @@ FROM ${BUILD_FROM} RUN apk --no-cache add \ libva-intel-driver -ARG BUILD_ARCH=amd64 -ARG BUILD_DATE="1970-01-01 00:00:00+00:00" -ARG BUILD_REPOSITORY -ARG BUILD_VERSION=0.0.0-local - -LABEL \ - io.hass.type="core" \ - io.hass.arch="${BUILD_ARCH}" \ - io.hass.version="${BUILD_VERSION}" \ - org.opencontainers.image.created="${BUILD_DATE}" \ - org.opencontainers.image.version="${BUILD_VERSION}" \ - org.opencontainers.image.source="${BUILD_REPOSITORY}" +LABEL io.hass.type="core" diff --git a/machine/khadas-vim3 b/machine/khadas-vim3 index 78e1cd05fc79..ddac174f4cdf 100644 --- a/machine/khadas-vim3 +++ b/machine/khadas-vim3 @@ -4,15 +4,4 @@ ARG BUILD_FROM=ghcr.io/home-assistant/aarch64-homeassistant:latest FROM ${BUILD_FROM} -ARG BUILD_ARCH=aarch64 -ARG BUILD_DATE="1970-01-01 00:00:00+00:00" -ARG BUILD_REPOSITORY -ARG BUILD_VERSION=0.0.0-local - -LABEL \ - io.hass.type="core" \ - io.hass.arch="${BUILD_ARCH}" \ - io.hass.version="${BUILD_VERSION}" \ - org.opencontainers.image.created="${BUILD_DATE}" \ - org.opencontainers.image.version="${BUILD_VERSION}" \ - org.opencontainers.image.source="${BUILD_REPOSITORY}" +LABEL io.hass.type="core" diff --git a/machine/odroid-c2 b/machine/odroid-c2 index 78e1cd05fc79..ddac174f4cdf 100644 --- a/machine/odroid-c2 +++ b/machine/odroid-c2 @@ -4,15 +4,4 @@ ARG BUILD_FROM=ghcr.io/home-assistant/aarch64-homeassistant:latest FROM ${BUILD_FROM} -ARG BUILD_ARCH=aarch64 -ARG BUILD_DATE="1970-01-01 00:00:00+00:00" -ARG BUILD_REPOSITORY -ARG BUILD_VERSION=0.0.0-local - -LABEL \ - io.hass.type="core" \ - io.hass.arch="${BUILD_ARCH}" \ - io.hass.version="${BUILD_VERSION}" \ - org.opencontainers.image.created="${BUILD_DATE}" \ - org.opencontainers.image.version="${BUILD_VERSION}" \ - org.opencontainers.image.source="${BUILD_REPOSITORY}" +LABEL io.hass.type="core" diff --git a/machine/odroid-c4 b/machine/odroid-c4 index 78e1cd05fc79..ddac174f4cdf 100644 --- a/machine/odroid-c4 +++ b/machine/odroid-c4 @@ -4,15 +4,4 @@ ARG BUILD_FROM=ghcr.io/home-assistant/aarch64-homeassistant:latest FROM ${BUILD_FROM} -ARG BUILD_ARCH=aarch64 -ARG BUILD_DATE="1970-01-01 00:00:00+00:00" -ARG BUILD_REPOSITORY -ARG BUILD_VERSION=0.0.0-local - -LABEL \ - io.hass.type="core" \ - io.hass.arch="${BUILD_ARCH}" \ - io.hass.version="${BUILD_VERSION}" \ - org.opencontainers.image.created="${BUILD_DATE}" \ - org.opencontainers.image.version="${BUILD_VERSION}" \ - org.opencontainers.image.source="${BUILD_REPOSITORY}" +LABEL io.hass.type="core" diff --git a/machine/odroid-m1 b/machine/odroid-m1 index 78e1cd05fc79..ddac174f4cdf 100644 --- a/machine/odroid-m1 +++ b/machine/odroid-m1 @@ -4,15 +4,4 @@ ARG BUILD_FROM=ghcr.io/home-assistant/aarch64-homeassistant:latest FROM ${BUILD_FROM} -ARG BUILD_ARCH=aarch64 -ARG BUILD_DATE="1970-01-01 00:00:00+00:00" -ARG BUILD_REPOSITORY -ARG BUILD_VERSION=0.0.0-local - -LABEL \ - io.hass.type="core" \ - io.hass.arch="${BUILD_ARCH}" \ - io.hass.version="${BUILD_VERSION}" \ - org.opencontainers.image.created="${BUILD_DATE}" \ - org.opencontainers.image.version="${BUILD_VERSION}" \ - org.opencontainers.image.source="${BUILD_REPOSITORY}" +LABEL io.hass.type="core" diff --git a/machine/odroid-n2 b/machine/odroid-n2 index 78e1cd05fc79..ddac174f4cdf 100644 --- a/machine/odroid-n2 +++ b/machine/odroid-n2 @@ -4,15 +4,4 @@ ARG BUILD_FROM=ghcr.io/home-assistant/aarch64-homeassistant:latest FROM ${BUILD_FROM} -ARG BUILD_ARCH=aarch64 -ARG BUILD_DATE="1970-01-01 00:00:00+00:00" -ARG BUILD_REPOSITORY -ARG BUILD_VERSION=0.0.0-local - -LABEL \ - io.hass.type="core" \ - io.hass.arch="${BUILD_ARCH}" \ - io.hass.version="${BUILD_VERSION}" \ - org.opencontainers.image.created="${BUILD_DATE}" \ - org.opencontainers.image.version="${BUILD_VERSION}" \ - org.opencontainers.image.source="${BUILD_REPOSITORY}" +LABEL io.hass.type="core" diff --git a/machine/qemuarm-64 b/machine/qemuarm-64 index 78e1cd05fc79..ddac174f4cdf 100644 --- a/machine/qemuarm-64 +++ b/machine/qemuarm-64 @@ -4,15 +4,4 @@ ARG BUILD_FROM=ghcr.io/home-assistant/aarch64-homeassistant:latest FROM ${BUILD_FROM} -ARG BUILD_ARCH=aarch64 -ARG BUILD_DATE="1970-01-01 00:00:00+00:00" -ARG BUILD_REPOSITORY -ARG BUILD_VERSION=0.0.0-local - -LABEL \ - io.hass.type="core" \ - io.hass.arch="${BUILD_ARCH}" \ - io.hass.version="${BUILD_VERSION}" \ - org.opencontainers.image.created="${BUILD_DATE}" \ - org.opencontainers.image.version="${BUILD_VERSION}" \ - org.opencontainers.image.source="${BUILD_REPOSITORY}" +LABEL io.hass.type="core" diff --git a/machine/qemux86-64 b/machine/qemux86-64 index 962ea761782f..b6eda55482be 100644 --- a/machine/qemux86-64 +++ b/machine/qemux86-64 @@ -4,15 +4,4 @@ ARG BUILD_FROM=ghcr.io/home-assistant/amd64-homeassistant:latest FROM ${BUILD_FROM} -ARG BUILD_ARCH=amd64 -ARG BUILD_DATE="1970-01-01 00:00:00+00:00" -ARG BUILD_REPOSITORY -ARG BUILD_VERSION=0.0.0-local - -LABEL \ - io.hass.type="core" \ - io.hass.arch="${BUILD_ARCH}" \ - io.hass.version="${BUILD_VERSION}" \ - org.opencontainers.image.created="${BUILD_DATE}" \ - org.opencontainers.image.version="${BUILD_VERSION}" \ - org.opencontainers.image.source="${BUILD_REPOSITORY}" +LABEL io.hass.type="core" diff --git a/machine/raspberrypi3-64 b/machine/raspberrypi3-64 index 57eae77e48d0..a9413ac7ea6d 100644 --- a/machine/raspberrypi3-64 +++ b/machine/raspberrypi3-64 @@ -7,15 +7,4 @@ FROM ${BUILD_FROM} RUN apk --no-cache add \ raspberrypi-utils -ARG BUILD_ARCH=aarch64 -ARG BUILD_DATE="1970-01-01 00:00:00+00:00" -ARG BUILD_REPOSITORY -ARG BUILD_VERSION=0.0.0-local - -LABEL \ - io.hass.type="core" \ - io.hass.arch="${BUILD_ARCH}" \ - io.hass.version="${BUILD_VERSION}" \ - org.opencontainers.image.created="${BUILD_DATE}" \ - org.opencontainers.image.version="${BUILD_VERSION}" \ - org.opencontainers.image.source="${BUILD_REPOSITORY}" +LABEL io.hass.type="core" diff --git a/machine/raspberrypi4-64 b/machine/raspberrypi4-64 index 57eae77e48d0..a9413ac7ea6d 100644 --- a/machine/raspberrypi4-64 +++ b/machine/raspberrypi4-64 @@ -7,15 +7,4 @@ FROM ${BUILD_FROM} RUN apk --no-cache add \ raspberrypi-utils -ARG BUILD_ARCH=aarch64 -ARG BUILD_DATE="1970-01-01 00:00:00+00:00" -ARG BUILD_REPOSITORY -ARG BUILD_VERSION=0.0.0-local - -LABEL \ - io.hass.type="core" \ - io.hass.arch="${BUILD_ARCH}" \ - io.hass.version="${BUILD_VERSION}" \ - org.opencontainers.image.created="${BUILD_DATE}" \ - org.opencontainers.image.version="${BUILD_VERSION}" \ - org.opencontainers.image.source="${BUILD_REPOSITORY}" +LABEL io.hass.type="core" diff --git a/machine/raspberrypi5-64 b/machine/raspberrypi5-64 index 57eae77e48d0..a9413ac7ea6d 100644 --- a/machine/raspberrypi5-64 +++ b/machine/raspberrypi5-64 @@ -7,15 +7,4 @@ FROM ${BUILD_FROM} RUN apk --no-cache add \ raspberrypi-utils -ARG BUILD_ARCH=aarch64 -ARG BUILD_DATE="1970-01-01 00:00:00+00:00" -ARG BUILD_REPOSITORY -ARG BUILD_VERSION=0.0.0-local - -LABEL \ - io.hass.type="core" \ - io.hass.arch="${BUILD_ARCH}" \ - io.hass.version="${BUILD_VERSION}" \ - org.opencontainers.image.created="${BUILD_DATE}" \ - org.opencontainers.image.version="${BUILD_VERSION}" \ - org.opencontainers.image.source="${BUILD_REPOSITORY}" +LABEL io.hass.type="core" diff --git a/machine/yellow b/machine/yellow index 57eae77e48d0..a9413ac7ea6d 100644 --- a/machine/yellow +++ b/machine/yellow @@ -7,15 +7,4 @@ FROM ${BUILD_FROM} RUN apk --no-cache add \ raspberrypi-utils -ARG BUILD_ARCH=aarch64 -ARG BUILD_DATE="1970-01-01 00:00:00+00:00" -ARG BUILD_REPOSITORY -ARG BUILD_VERSION=0.0.0-local - -LABEL \ - io.hass.type="core" \ - io.hass.arch="${BUILD_ARCH}" \ - io.hass.version="${BUILD_VERSION}" \ - org.opencontainers.image.created="${BUILD_DATE}" \ - org.opencontainers.image.version="${BUILD_VERSION}" \ - org.opencontainers.image.source="${BUILD_REPOSITORY}" +LABEL io.hass.type="core" diff --git a/script/hassfest/docker.py b/script/hassfest/docker.py index 50d67e7718c2..78a4f839777e 100644 --- a/script/hassfest/docker.py +++ b/script/hassfest/docker.py @@ -66,18 +66,8 @@ RUN \ WORKDIR /config -ARG BUILD_ARCH=amd64 -ARG BUILD_DATE="1970-01-01 00:00:00+00:00" -ARG BUILD_REPOSITORY -ARG BUILD_VERSION=0.0.0-local - LABEL \ io.hass.type="core" \ - io.hass.arch="${{BUILD_ARCH}}" \ - io.hass.version="${{BUILD_VERSION}}" \ - org.opencontainers.image.created="${{BUILD_DATE}}" \ - org.opencontainers.image.version="${{BUILD_VERSION}}" \ - org.opencontainers.image.source="${{BUILD_REPOSITORY}}" \ org.opencontainers.image.authors="The Home Assistant Authors" \ org.opencontainers.image.description="Open-source home automation platform running on Python 3" \ org.opencontainers.image.documentation="https://www.home-assistant.io/docs/" \ @@ -118,18 +108,7 @@ _MACHINE_DOCKERFILE_TEMPLATE = r"""# Automatically generated by hassfest. ARG BUILD_FROM=ghcr.io/home-assistant/{arch}-homeassistant:latest FROM ${{BUILD_FROM}} {extra_packages} -ARG BUILD_ARCH={arch} -ARG BUILD_DATE="1970-01-01 00:00:00+00:00" -ARG BUILD_REPOSITORY -ARG BUILD_VERSION=0.0.0-local - -LABEL \ - io.hass.type="core" \ - io.hass.arch="${{BUILD_ARCH}}" \ - io.hass.version="${{BUILD_VERSION}}" \ - org.opencontainers.image.created="${{BUILD_DATE}}" \ - org.opencontainers.image.version="${{BUILD_VERSION}}" \ - org.opencontainers.image.source="${{BUILD_REPOSITORY}}" +LABEL io.hass.type="core" """