Fix Docker access issue - version 1.0.4

This commit is contained in:
Jørgen Ferdinand 2025-03-07 22:35:18 +01:00
parent e4d2b85013
commit de355f1ced
3 changed files with 7 additions and 6 deletions

View file

@ -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 FROM ghcr.io/hassio-addons/base:14.0.0
# Set the correct Shell for Home Assistant add-ons # Set the correct Shell for Home Assistant add-ons
SHELL ["/bin/bash", "-o", "pipefail", "-c"] SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# Install necessary dependencies (if needed) # Install necessary dependencies
RUN apk add --no-cache docker-cli bash RUN apk add --no-cache docker-cli bash
# Copy the script into the container # Copy the script into the container

View file

@ -1,5 +1,5 @@
name: "Newt Add-on" name: "Newt Add-on"
version: "1.0.3" version: "1.0.4"
slug: "newt" slug: "newt"
description: "Runs the Newt container inside Home Assistant" description: "Runs the Newt container inside Home Assistant"
arch: arch:
@ -11,8 +11,9 @@ startup: system
boot: auto boot: auto
host_network: true host_network: true
privileged: privileged:
- NET_ADMIN
- SYS_ADMIN - SYS_ADMIN
- NET_ADMIN
- DAC_READ_SEARCH
options: options:
PANGOLIN_ENDPOINT: "https://example.com" PANGOLIN_ENDPOINT: "https://example.com"
NEWT_ID: "your_newt_id" NEWT_ID: "your_newt_id"

View file

@ -8,7 +8,7 @@ PANGOLIN_ENDPOINT=${PANGOLIN_ENDPOINT:-"https://example.com"}
NEWT_ID=${NEWT_ID:-"default_id"} NEWT_ID=${NEWT_ID:-"default_id"}
NEWT_SECRET=${NEWT_SECRET:-"default_secret"} NEWT_SECRET=${NEWT_SECRET:-"default_secret"}
# Ensure Docker is running # Check if Docker is available
if ! docker info >/dev/null 2>&1; then if ! docker info >/dev/null 2>&1; then
echo "Docker is not available inside Home Assistant OS!" echo "Docker is not available inside Home Assistant OS!"
exit 1 exit 1
@ -31,4 +31,4 @@ docker run -d --restart unless-stopped \
echo "Newt container is running!" echo "Newt container is running!"
# Keep the script running # Keep the script running
exec tail -f /dev/null exec tail -f /dev/null