From 85ed65f944ef89ff3a6add2631f10289075b2a8d Mon Sep 17 00:00:00 2001 From: SdgJlbl Date: Tue, 16 Jul 2024 11:57:51 +0200 Subject: [PATCH] fix: ensure that compute functions are running as non-root Signed-off-by: SdgJlbl --- substrafl/remote/register/register.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/substrafl/remote/register/register.py b/substrafl/remote/register/register.py index acfdc4a1..73a8c956 100644 --- a/substrafl/remote/register/register.py +++ b/substrafl/remote/register/register.py @@ -37,6 +37,13 @@ # update image RUN apt update -y +# create a non-root user +RUN addgroup --gid 1001 group +RUN adduser --disabled-password --gecos "" --uid 1001 --gid 1001 --home /home user +ENV PYTHONPATH /home +WORKDIR /home +USER user + # install dependencies RUN python{python_version} -m pip install -U pip