diff --git a/backend/Dockerfile b/backend/Dockerfile index 0c1a105f05..5a430d60f6 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -26,3 +26,8 @@ ENTRYPOINT ["dotnet", "backend.dll"] # Making sure we run apt-get to get necessary requirements for SQLite plugins RUN apt-get update RUN apt-get install -y libgomp1 libatlas-base-dev liblapack-dev + +# Making sure we run in the context of a custom user with restricted access to core operating system +RUN groupadd -r magic && useradd -g magic magic +RUN chown -R magic:magic /magic/files +USER magic