From ec96bf404dead249c3840db8e549951729dc1497 Mon Sep 17 00:00:00 2001 From: Michel Promonet Date: Sat, 28 Oct 2023 18:04:15 +0200 Subject: [PATCH] add user for docker runtime --- Dockerfile | 3 +++ Dockerfile.arm64 | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/Dockerfile b/Dockerfile index 8647dedd..cadedd05 100644 --- a/Dockerfile +++ b/Dockerfile @@ -31,8 +31,11 @@ WORKDIR /app COPY --from=builder /app/ /app/ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends libssl-dev libasound2 libgtk-3-0 libxtst6 libpulse0 librtmp1 avahi-utils \ + && useradd -M user \ && apt-get clean && rm -rf /var/lib/apt/lists/ \ && ./webrtc-streamer -V +USER user + ENTRYPOINT [ "./webrtc-streamer" ] CMD [ "-C", "config.json" ] diff --git a/Dockerfile.arm64 b/Dockerfile.arm64 index c6e4bdcf..4824d467 100644 --- a/Dockerfile.arm64 +++ b/Dockerfile.arm64 @@ -31,5 +31,9 @@ FROM $IMAGE WORKDIR /app COPY --from=builder /app/ /app/ +RUN useradd -M user + +USER user + ENTRYPOINT [ "./webrtc-streamer" ] CMD [ "-a", "-C", "config.json" ]