From d20568e83c741481b29a326344a4407a19c64301 Mon Sep 17 00:00:00 2001 From: Robert Resch Date: Wed, 2 Apr 2025 16:48:14 +0200 Subject: [PATCH] Copy go2rtc binary from offical docker image --- Dockerfile | 15 +-------------- script/hassfest/docker.py | 15 +-------------- 2 files changed, 2 insertions(+), 28 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0a74e0a3aac..2f2ba69159c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,21 +14,8 @@ ARG QEMU_CPU # Home Assistant S6-Overlay COPY rootfs / - -# Needs to be redefined inside the FROM statement to be set for RUN commands -ARG BUILD_ARCH # Get go2rtc binary -RUN \ - case "${BUILD_ARCH}" in \ - "aarch64") go2rtc_suffix='arm64' ;; \ - "armhf") go2rtc_suffix='armv6' ;; \ - "armv7") go2rtc_suffix='arm' ;; \ - *) go2rtc_suffix=${BUILD_ARCH} ;; \ - esac \ - && curl -L https://github.com/AlexxIT/go2rtc/releases/download/v1.9.9/go2rtc_linux_${go2rtc_suffix} --output /bin/go2rtc \ - && chmod +x /bin/go2rtc \ - # Verify go2rtc can be executed - && go2rtc --version +COPY --from=ghcr.io/alexxit/go2rtc:1.9.9 /usr/local/bin/go2rtc /bin/go2rtc # Install uv RUN pip3 install uv==0.6.10 diff --git a/script/hassfest/docker.py b/script/hassfest/docker.py index 4bf6c3bb0a6..c8f6ce7f870 100644 --- a/script/hassfest/docker.py +++ b/script/hassfest/docker.py @@ -28,21 +28,8 @@ ARG QEMU_CPU # Home Assistant S6-Overlay COPY rootfs / - -# Needs to be redefined inside the FROM statement to be set for RUN commands -ARG BUILD_ARCH # Get go2rtc binary -RUN \ - case "${{BUILD_ARCH}}" in \ - "aarch64") go2rtc_suffix='arm64' ;; \ - "armhf") go2rtc_suffix='armv6' ;; \ - "armv7") go2rtc_suffix='arm' ;; \ - *) go2rtc_suffix=${{BUILD_ARCH}} ;; \ - esac \ - && curl -L https://github.com/AlexxIT/go2rtc/releases/download/v{go2rtc}/go2rtc_linux_${{go2rtc_suffix}} --output /bin/go2rtc \ - && chmod +x /bin/go2rtc \ - # Verify go2rtc can be executed - && go2rtc --version +COPY --from=ghcr.io/alexxit/go2rtc:{go2rtc} /usr/local/bin/go2rtc /bin/go2rtc # Install uv RUN pip3 install uv=={uv}