From af638e53f62a0a1a1263abd5e7a9bb5f62a6c283 Mon Sep 17 00:00:00 2001 From: Sean McBride Date: Thu, 8 Apr 2021 00:39:07 +0000 Subject: [PATCH] chore: WIP try to use non root user --- Dockerfile.x86_64 | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/Dockerfile.x86_64 b/Dockerfile.x86_64 index 111f1a3..e535590 100644 --- a/Dockerfile.x86_64 +++ b/Dockerfile.x86_64 @@ -66,3 +66,23 @@ ENV LC_ALL C.UTF-8 ENV PATH=/opt/sledge/bin:$PATH ENV LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH + +# WIP: Try to use a non-root user +# # RUN rm /bin/sh && ln -s /bin/bash /bin/sh + +# ARG USERNAME=dev +# ARG USER_UID=1000 +# ARG USER_GID=$USER_UID + +# # Create the user and add to sudoers +# RUN groupadd --gid $USER_GID $USERNAME +# RUN useradd --uid $USER_UID --gid $USER_GID -m $USERNAME +# RUN apt-get update && apt-get install -y sudo +# RUN echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \ +# RUN chmod 0440 /etc/sudoers.d/$USERNAME + +# # ******************************************************** +# # * Anything else you want to do like clean up goes here * +# # ******************************************************** + +# # [Optional] Set the default user. Omit if you want to keep the default as root.