Possible fix
Error: s6-overlay-suexec: fatal: can only run as pid 1
This commit is contained in:
parent
ee7dd5da82
commit
c8bb9cbb3f
2 changed files with 13 additions and 12 deletions
|
@ -1,10 +1,9 @@
|
|||
# Use the official Home Assistant add-on base image
|
||||
FROM ghcr.io/hassio-addons/base:14.0.0
|
||||
|
||||
# Install dependencies
|
||||
RUN apk add --no-cache docker-cli
|
||||
|
||||
# Copy the run script
|
||||
# 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" ]
|
16
newt/run.sh
16
newt/run.sh
|
@ -1,26 +1,26 @@
|
|||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
echo "Starter Newt container..."
|
||||
echo "Starting Newt container..."
|
||||
|
||||
# Hent verdier fra Home Assistant config
|
||||
# Load config from Home Assistant options
|
||||
PANGOLIN_ENDPOINT=$(bashio::config 'PANGOLIN_ENDPOINT')
|
||||
NEWT_ID=$(bashio::config 'NEWT_ID')
|
||||
NEWT_SECRET=$(bashio::config 'NEWT_SECRET')
|
||||
|
||||
# Sjekk at Docker kjører
|
||||
# Ensure Docker is running
|
||||
if ! docker info >/dev/null 2>&1; then
|
||||
echo "Docker er ikke tilgjengelig i Home Assistant OS!"
|
||||
echo "Docker is not available inside Home Assistant OS!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Stopp og fjern gammel container hvis den finnes
|
||||
# Stop and remove any existing Newt container
|
||||
if docker ps -a --format '{{.Names}}' | grep -q "newt"; then
|
||||
docker stop newt
|
||||
docker rm newt
|
||||
fi
|
||||
|
||||
# Kjør Newt-containeren
|
||||
# Run Newt container
|
||||
docker run -d --restart unless-stopped \
|
||||
--name newt \
|
||||
-e PANGOLIN_ENDPOINT="$PANGOLIN_ENDPOINT" \
|
||||
|
@ -28,5 +28,7 @@ docker run -d --restart unless-stopped \
|
|||
-e NEWT_SECRET="$NEWT_SECRET" \
|
||||
fosrl/newt
|
||||
|
||||
echo "Newt-container kjører!"
|
||||
echo "Newt container is running!"
|
||||
|
||||
# Prevent the script from exiting (keeps the add-on running)
|
||||
exec tail -f /dev/null
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue