diff --git a/Base/Dockerfile b/Base/Dockerfile index e635f9cd4..5687853d6 100644 --- a/Base/Dockerfile +++ b/Base/Dockerfile @@ -41,11 +41,15 @@ RUN echo "${TZ}" > /etc/timezone \ && dpkg-reconfigure --frontend noninteractive tzdata #======================================== -# Add normal user with passwordless sudo +# Add normal user and group with passwordless sudo #======================================== -RUN useradd seluser \ - --shell /bin/bash \ +RUN groupadd seluser \ + --gid 1201 \ + && useradd seluser \ --create-home \ + --gid 1201 \ + --shell /bin/bash \ + --uid 1200 \ && usermod -a -G sudo seluser \ && echo 'ALL ALL = (ALL) NOPASSWD: ALL' >> /etc/sudoers \ && echo 'seluser:secret' | chpasswd @@ -75,7 +79,7 @@ RUN mkdir -p /opt/selenium /var/run/supervisor /var/log/supervisor \ #=================================================== # Run the following commands as non-privileged user #=================================================== -USER seluser +USER 1200:1201 CMD ["/opt/bin/entry_point.sh"] diff --git a/Hub/Dockerfile.txt b/Hub/Dockerfile.txt index b65202fae..956612582 100644 --- a/Hub/Dockerfile.txt +++ b/Hub/Dockerfile.txt @@ -1,4 +1,4 @@ -USER seluser +USER 1200 #======================== # Selenium Configuration diff --git a/NodeBase/Dockerfile.txt b/NodeBase/Dockerfile.txt index f3a281135..615f00bfb 100644 --- a/NodeBase/Dockerfile.txt +++ b/NodeBase/Dockerfile.txt @@ -68,7 +68,7 @@ RUN apt-get -qqy update \ # Run the following commands as non-privileged user #=================================================== -USER seluser +USER 1200 #============================== # Scripts to run Selenium Node and XVFB diff --git a/NodeChrome/Dockerfile.txt b/NodeChrome/Dockerfile.txt index 5bea94806..2b4bad0eb 100644 --- a/NodeChrome/Dockerfile.txt +++ b/NodeChrome/Dockerfile.txt @@ -25,7 +25,7 @@ RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key COPY wrap_chrome_binary /opt/bin/wrap_chrome_binary RUN /opt/bin/wrap_chrome_binary -USER seluser +USER 1200 #============================================ # Chrome webdriver diff --git a/NodeDebug/Dockerfile.txt b/NodeDebug/Dockerfile.txt index df2a5ae2c..7b89e6f88 100644 --- a/NodeDebug/Dockerfile.txt +++ b/NodeDebug/Dockerfile.txt @@ -17,7 +17,7 @@ RUN apt-get update -qqy \ fluxbox \ && rm -rf /var/lib/apt/lists/* /var/cache/apt/* -USER seluser +USER 1200 #============================== # Generating the VNC password as seluser diff --git a/NodeFirefox/Dockerfile.txt b/NodeFirefox/Dockerfile.txt index a1ee6a28e..ac0245b12 100644 --- a/NodeFirefox/Dockerfile.txt +++ b/NodeFirefox/Dockerfile.txt @@ -30,7 +30,7 @@ RUN GK_VERSION=$(if [ ${GECKODRIVER_VERSION:-latest} = "latest" ]; then echo "0. && chmod 755 /opt/geckodriver-$GK_VERSION \ && ln -fs /opt/geckodriver-$GK_VERSION /usr/bin/geckodriver -USER seluser +USER 1200 COPY generate_config /opt/bin/generate_config diff --git a/NodeOpera/Dockerfile.txt b/NodeOpera/Dockerfile.txt index 9d2189341..cbd82ff36 100644 --- a/NodeOpera/Dockerfile.txt +++ b/NodeOpera/Dockerfile.txt @@ -32,7 +32,7 @@ RUN wget -q -O - https://deb.opera.com/archive.key | apt-key add - \ COPY wrap_opera_binary /opt/bin/wrap_opera_binary RUN /opt/bin/wrap_opera_binary -USER seluser +USER 1200 #===================== # Opera webdriver diff --git a/Standalone/Dockerfile.txt b/Standalone/Dockerfile.txt index 22c00fa7f..bc39fb4ff 100644 --- a/Standalone/Dockerfile.txt +++ b/Standalone/Dockerfile.txt @@ -1,4 +1,4 @@ -USER seluser +USER 1200 #==================================== # Scripts to run Selenium Standalone