From d4af1703245a9b29b9975afef79a5f87cbe707da Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Tue, 23 Apr 2024 13:06:55 +0200 Subject: [PATCH] Update Dockerfile --- zzz_draft_birdnet-pi/Dockerfile | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/zzz_draft_birdnet-pi/Dockerfile b/zzz_draft_birdnet-pi/Dockerfile index 1b0c95815..46e19af99 100644 --- a/zzz_draft_birdnet-pi/Dockerfile +++ b/zzz_draft_birdnet-pi/Dockerfile @@ -20,15 +20,18 @@ FROM ${BUILD_FROM} SHELL ["/bin/bash", "-o", "pipefail", "-c"] ENV DEBIAN_FRONTEND noninteractive -ENV HOME="/config" -# Install dependencies -RUN apt-get update -y && apt-get install gcc python3-dev -y - -# Install app -RUN curl -f -L -s -S "https://raw.githubusercontent.com/Nachtzuster/BirdNET-Pi/main/newinstaller.sh" -o /newinstaller.sh && \ - chmod +x /newinstaller.sh && \ - sed -i "/sudo reboot/d" /newinstaller.sh && \ - /./newinstaller.sh +ENV HOME="/root" +RUN \ + # Install dependencies + apt-get update -y && apt-get install gcc python3-dev sudo -y && \ + \ + # Create user + groupadd --gid 1000 birdnet && useradd --uid 1000 --gid birdnet --shell /bin/bash --create-home birdnet + \ + # Install app + curl -f -L -s -S "https://raw.githubusercontent.com/Nachtzuster/BirdNET-Pi/main/newinstaller.sh" -o /newinstaller.sh && \ + chmod 777 /newinstaller.sh && \ + sudo -u birdnet -s /bin/bash -c "/newinstaller.sh" ################## # 2 Modify Image #