From de355f1cedd54e875e42dc2494193a8813c5baa9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20Ferdinand?= Date: Fri, 7 Mar 2025 22:35:18 +0100 Subject: [PATCH] Fix Docker access issue - version 1.0.4 --- newt/Dockerfile | 4 ++-- newt/config.yaml | 5 +++-- newt/run.sh | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/newt/Dockerfile b/newt/Dockerfile index a9bcb85..8144831 100644 --- a/newt/Dockerfile +++ b/newt/Dockerfile @@ -1,10 +1,10 @@ -# Use the official Home Assistant add-on base image +# Use the 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) +# Install necessary dependencies RUN apk add --no-cache docker-cli bash # Copy the script into the container diff --git a/newt/config.yaml b/newt/config.yaml index a2806d0..ff16063 100644 --- a/newt/config.yaml +++ b/newt/config.yaml @@ -1,5 +1,5 @@ name: "Newt Add-on" -version: "1.0.3" +version: "1.0.4" slug: "newt" description: "Runs the Newt container inside Home Assistant" arch: @@ -11,8 +11,9 @@ startup: system boot: auto host_network: true privileged: - - NET_ADMIN - SYS_ADMIN + - NET_ADMIN + - DAC_READ_SEARCH options: PANGOLIN_ENDPOINT: "https://example.com" NEWT_ID: "your_newt_id" diff --git a/newt/run.sh b/newt/run.sh index 5902f76..4423f98 100644 --- a/newt/run.sh +++ b/newt/run.sh @@ -8,7 +8,7 @@ PANGOLIN_ENDPOINT=${PANGOLIN_ENDPOINT:-"https://example.com"} NEWT_ID=${NEWT_ID:-"default_id"} NEWT_SECRET=${NEWT_SECRET:-"default_secret"} -# Ensure Docker is running +# Check if Docker is available if ! docker info >/dev/null 2>&1; then echo "Docker is not available inside Home Assistant OS!" exit 1 @@ -31,4 +31,4 @@ docker run -d --restart unless-stopped \ echo "Newt container is running!" # Keep the script running -exec tail -f /dev/null +exec tail -f /dev/null \ No newline at end of file