This commit is contained in:
Alexandre
2024-04-25 11:45:37 +02:00
parent 1450fc7ab2
commit 9e8606f091
2 changed files with 14 additions and 14 deletions

View File

@@ -19,13 +19,13 @@ ARG BUILD_FROM
FROM ${BUILD_FROM} FROM ${BUILD_FROM}
ENV DEBIAN_FRONTEND="noninteractive" \ ENV DEBIAN_FRONTEND="noninteractive" \
BIRDNET_USER="abc" \ BIRDNET_USER="pi" \
USER="abc" \ USER="pi" \
PUID=1000 \ PUID=1000 \
PGID=1000 \ PGID=1000 \
HOME="/home/abc" \ HOME="/home/pi" \
XDG_RUNTIME_DIR="/run/user/1000" \ XDG_RUNTIME_DIR="/run/user/1000" \
PYTHON_VIRTUAL_ENV="/home/abc/BirdNET-Pi/birdnet/bin/python3" PYTHON_VIRTUAL_ENV="/home/pi/BirdNET-Pi/birdnet/bin/python3"
# hadolint ignore=DL3015,SC2016 # hadolint ignore=DL3015,SC2016
RUN \ RUN \
@@ -33,9 +33,9 @@ RUN \
apt-get update -y && apt-get install gcc python3-dev git jq sudo -y && \ apt-get update -y && apt-get install gcc python3-dev git jq sudo -y && \
\ \
# Ensure permissions # Ensure permissions
mkdir -p /home/abc && \ mkdir -p /home/pi && \
chown -R abc:abc /home/abc && \ chown -R pi:pi /home/pi && \
echo "abc ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers && \ echo "pi ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers && \
\ \
# Download installer # Download installer
curl -f -L -s -S "https://raw.githubusercontent.com/Nachtzuster/BirdNET-Pi/main/newinstaller.sh" -o /newinstaller.sh && \ curl -f -L -s -S "https://raw.githubusercontent.com/Nachtzuster/BirdNET-Pi/main/newinstaller.sh" -o /newinstaller.sh && \
@@ -63,18 +63,18 @@ RUN \
\ \
# Adapt for lsio # Adapt for lsio
if [ -d /app ]; then rm -r /app; fi && \ if [ -d /app ]; then rm -r /app; fi && \
ln -s /home/abc /app && \ ln -s /home/pi /app && \
chown -R pi:pi /home/abc /app chown -R pi:pi /home/pi /app
#USER abc #USER pi
#WORKDIR /app #WORKDIR /app
#RUN export DEBIAN_FRONTEND noninteractive && \ #RUN export DEBIAN_FRONTEND noninteractive && \
# export BIRDNET_USER="abc" && \ # export BIRDNET_USER="pi" && \
# export USER="abc" && \ # export USER="pi" && \
# export HOME="/app" && \ # export HOME="/app" && \
# echo "HOME is $HOME" && \ # echo "HOME is $HOME" && \
# ls -l /app && \ # ls -l /app && \
# sudo chown -R abc:abc /app && \ # sudo chown -R pi:pi /app && \
# /./newinstaller.sh # /./newinstaller.sh
#USER root #USER root
#sudo -E -u birdnet -s /bin/bash -c "/newinstaller.sh" #sudo -E -u birdnet -s /bin/bash -c "/newinstaller.sh"

View File

@@ -90,5 +90,5 @@
}, },
"slug": "birdnet-pi", "slug": "birdnet-pi",
"url": "https://github.com/alexbelgium/hassio-addons/tree/master/birdnet-pi", "url": "https://github.com/alexbelgium/hassio-addons/tree/master/birdnet-pi",
"version": "0.3" "version": "0.4"
} }