From 4e6aa1d3ca8cad64b9ea19a98e888f460fe87eab Mon Sep 17 00:00:00 2001 From: Tom Kirkpatrick Date: Mon, 8 Apr 2024 11:02:24 +0200 Subject: [PATCH] Fixup docker file --- Dockerfile | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index c7856e2..9308dd5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,15 +1,16 @@ FROM debian:bookworm-slim -WORKDIR /app +# Create a group and user +RUN groupadd -r appgroup && useradd -r -g appgroup appuser -RUN apt-get update && \ - apt-get install -y --no-install-recommends curl tar && \ - rm -rf /var/lib/apt/lists/* +WORKDIR /app -# COPY ./schwifty-linux.tar.gz . +# Change the ownership of the /app directory to the appuser +RUN chown -R appuser:appgroup /app -# RUN tar -xzf schwifty-linux.tar.gz && rm schwifty-linux.tar.gz +# Switch to the appuser +USER appuser -COPY ./dist/schwifty . +COPY ./dist/linux/schwifty . ENTRYPOINT ["./schwifty"] \ No newline at end of file