From 911443e831a659a4266af1573a6f557c4512328b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=B3=E9=88=9E?= Date: Thu, 4 Jan 2024 22:38:34 +0800 Subject: [PATCH] refactor: prevent execution of arbitrary commands in container MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Preserve the removal of certain commands to prevent the container from executing arbitrary commands Signed-off-by: 陳鈞 --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7649b10..f989b19 100644 --- a/Dockerfile +++ b/Dockerfile @@ -71,8 +71,8 @@ COPY --link --chown=$UID:0 --chmod=775 --from=build /root/.local /home/$UID/.loc ENV PATH="/home/$UID/.local/bin:$PATH" ENV PYTHONPATH="/home/$UID/.local/lib/python3.12/site-packages:${PYTHONPATH}" -# Remove these to prevent the container from executing arbitrary commands -RUN rm /bin/echo /bin/ln /bin/rm /bin/sh +# # Remove these to prevent the container from executing arbitrary commands +# RUN rm /bin/echo /bin/ln /bin/rm /bin/sh WORKDIR /recordings