From f15004c8298e36ea14dc8e8acb19632add460dc0 Mon Sep 17 00:00:00 2001 From: Blake Blackshear Date: Sun, 2 Jun 2024 08:39:46 -0500 Subject: [PATCH] fix tempio install for arm64 --- docker/main/Dockerfile | 7 +++---- docker/main/install_tempio.sh | 16 ++++++++++++++++ 2 files changed, 19 insertions(+), 4 deletions(-) create mode 100755 docker/main/install_tempio.sh diff --git a/docker/main/Dockerfile b/docker/main/Dockerfile index 51293b78b6..15fb3b0302 100644 --- a/docker/main/Dockerfile +++ b/docker/main/Dockerfile @@ -35,11 +35,10 @@ ARG TARGETARCH WORKDIR /rootfs/usr/local/go2rtc/bin ADD --link --chmod=755 "https://github.com/AlexxIT/go2rtc/releases/download/v1.9.2/go2rtc_linux_${TARGETARCH}" go2rtc -FROM scratch AS tempio +FROM wget AS tempio ARG TARGETARCH -WORKDIR /rootfs/usr/local/tempio/bin -ADD --link --chmod=755 "https://github.com/home-assistant/tempio/releases/download/2021.09.0/tempio_${TARGETARCH}" tempio - +RUN --mount=type=bind,source=docker/main/install_tempio.sh,target=/deps/install_tempio.sh \ + /deps/install_tempio.sh #### # diff --git a/docker/main/install_tempio.sh b/docker/main/install_tempio.sh new file mode 100755 index 0000000000..743a122889 --- /dev/null +++ b/docker/main/install_tempio.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +set -euxo pipefail + +tempio_version="2021.09.0" + +if [[ "${TARGETARCH}" == "amd64" ]]; then + arch="amd64" +elif [[ "${TARGETARCH}" == "arm64" ]]; then + arch="aarch64" +fi + +mkdir -p /rootfs/usr/local/tempio/bin + +wget -q -O /rootfs/usr/local/tempio/bin/tempio "https://github.com/home-assistant/tempio/releases/download/${tempio_version}/tempio_${arch}" +chmod 755 /rootfs/usr/local/tempio/bin/tempio