From a465be1172e9c9ba2a4ba6e580645ee2a4296f39 Mon Sep 17 00:00:00 2001 From: Jakob Schlyter Date: Mon, 25 Nov 2024 15:15:26 +0100 Subject: [PATCH 1/3] fix JSONArgsRecommended --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index d518989..bcc97bc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,4 +8,4 @@ FROM python:3.12 WORKDIR /tmp COPY --from=builder /src/dist/*.whl . RUN pip3 install *.whl && rm *.whl -ENTRYPOINT evrec_server +ENTRYPOINT ["evrec_server"] From 3616a8e8616bb2542403e27da7133db4870f46cf Mon Sep 17 00:00:00 2001 From: Jakob Schlyter Date: Mon, 25 Nov 2024 15:20:42 +0100 Subject: [PATCH 2/3] add CMD and create user --- Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Dockerfile b/Dockerfile index bcc97bc..9923448 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,4 +8,7 @@ FROM python:3.12 WORKDIR /tmp COPY --from=builder /src/dist/*.whl . RUN pip3 install *.whl && rm *.whl +RUN useradd -r -u 1000 -g root evrec +USER evrec +CMD ["--host", "0.0.0.0", "--port", "8080"] ENTRYPOINT ["evrec_server"] From 7630fe0148f4a84b7e7293c6a447e7240ef95367 Mon Sep 17 00:00:00 2001 From: Jakob Schlyter Date: Mon, 25 Nov 2024 15:32:26 +0100 Subject: [PATCH 3/3] disable login, create homedir, order --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9923448..31777b8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,7 +8,7 @@ FROM python:3.12 WORKDIR /tmp COPY --from=builder /src/dist/*.whl . RUN pip3 install *.whl && rm *.whl -RUN useradd -r -u 1000 -g root evrec +RUN useradd -u 1000 -m -s /sbin/nologin evrec USER evrec -CMD ["--host", "0.0.0.0", "--port", "8080"] ENTRYPOINT ["evrec_server"] +CMD ["--host", "0.0.0.0", "--port", "8080"]