From 104116cd13bd7c5ce3907bab9d35b6ab1f9295b4 Mon Sep 17 00:00:00 2001 From: Joao Zanutto Date: Mon, 1 Apr 2024 10:45:29 -0700 Subject: [PATCH] adjust dockerfile --- docker/greenmask/Dockerfile | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/docker/greenmask/Dockerfile b/docker/greenmask/Dockerfile index 36c656dd..d0c4e9d9 100644 --- a/docker/greenmask/Dockerfile +++ b/docker/greenmask/Dockerfile @@ -33,12 +33,16 @@ RUN apt-get update \ COPY --from=build /var/lib/greenmask/greenmask /usr/bin -RUN mkdir ~/.bash_completions \ - && greenmask completion bash > /root/.bash_completions/greenmask.bash \ - && echo 'source /etc/bash_completion' >> /root/.bashrc \ - && echo 'source /root/.bash_completions/greenmask.bash' >> /root/.bashrc +RUN mkdir /home/greenmask \ + && groupadd -g 10001 greenmask \ + && useradd -u 10000 -g greenmask greenmask \ + && chown -R greenmask:greenmask /home/greenmask + +USER greenmask:greenmask -RUN groupadd -r greenmask && useradd -r -g greenmask greenmask -USER greenmask +RUN mkdir ~/.bash_completions \ + && greenmask completion bash > ~/.bash_completions/greenmask.bash \ + && echo 'source /etc/bash_completion' >> ~/.bashrc \ + && echo 'source ~/.bash_completions/greenmask.bash' >> ~/.bashrc ENTRYPOINT ["greenmask"]