From 2eaed37ef66f28fb561a2c0148455a1300a2fc86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20Ferdinand?= Date: Fri, 7 Mar 2025 22:31:13 +0100 Subject: [PATCH] Fix PID 1 issue and update to version 1.0.2 --- newt/Dockerfile | 8 +++++++- newt/config.yaml | 2 +- newt/run.sh | 4 ++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/newt/Dockerfile b/newt/Dockerfile index e0ccf0c..a9bcb85 100644 --- a/newt/Dockerfile +++ b/newt/Dockerfile @@ -1,9 +1,15 @@ # Use the official Home Assistant add-on base image FROM ghcr.io/hassio-addons/base:14.0.0 +# Set the correct Shell for Home Assistant add-ons +SHELL ["/bin/bash", "-o", "pipefail", "-c"] + +# Install necessary dependencies (if needed) +RUN apk add --no-cache docker-cli bash + # Copy the script into the container COPY run.sh /run.sh RUN chmod +x /run.sh # Run the script as the main process -CMD [ "/run.sh" ] \ No newline at end of file +ENTRYPOINT [ "/run.sh" ] \ No newline at end of file diff --git a/newt/config.yaml b/newt/config.yaml index 2e087f7..12c7c52 100644 --- a/newt/config.yaml +++ b/newt/config.yaml @@ -1,5 +1,5 @@ name: "Newt Add-on" -version: "1.0.1" +version: "1.0.2" slug: "newt" description: "Runs the Newt container inside Home Assistant" arch: diff --git a/newt/run.sh b/newt/run.sh index 9834f04..2f6bd8a 100644 --- a/newt/run.sh +++ b/newt/run.sh @@ -30,5 +30,5 @@ docker run -d --restart unless-stopped \ echo "Newt container is running!" -# Prevent the script from exiting (keeps the add-on running) -exec tail -f /dev/null +# Prevent the script from exiting (Keeps the add-on running) +exec tail -f /dev/null \ No newline at end of file