diff --git a/Base/Dockerfile b/Base/Dockerfile index e635f9cd4d..5687853d63 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 b/Hub/Dockerfile index 27cb8ced8b..13626c13e2 100644 --- a/Hub/Dockerfile +++ b/Hub/Dockerfile @@ -5,7 +5,7 @@ FROM selenium/base:3.141.59-20200525 LABEL authors=SeleniumHQ -USER seluser +USER 1200 #======================== # Selenium Configuration diff --git a/Hub/Dockerfile.txt b/Hub/Dockerfile.txt index b65202fae6..956612582b 100644 --- a/Hub/Dockerfile.txt +++ b/Hub/Dockerfile.txt @@ -1,4 +1,4 @@ -USER seluser +USER 1200 #======================== # Selenium Configuration diff --git a/NodeBase/Dockerfile b/NodeBase/Dockerfile index 6c4b704ec3..bc8edb5f8a 100644 --- a/NodeBase/Dockerfile +++ b/NodeBase/Dockerfile @@ -75,7 +75,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/NodeBase/Dockerfile.txt b/NodeBase/Dockerfile.txt index f3a2811352..615f00bfbb 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 b/NodeChrome/Dockerfile index 9eff903d09..ec668d22e3 100644 --- a/NodeChrome/Dockerfile +++ b/NodeChrome/Dockerfile @@ -32,7 +32,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/NodeChrome/Dockerfile.txt b/NodeChrome/Dockerfile.txt index 5bea94806d..2b4bad0ebb 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/NodeChromeDebug/Dockerfile b/NodeChromeDebug/Dockerfile index 95358df364..8894663f76 100644 --- a/NodeChromeDebug/Dockerfile +++ b/NodeChromeDebug/Dockerfile @@ -24,7 +24,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/NodeDebug/Dockerfile.txt b/NodeDebug/Dockerfile.txt index df2a5ae2c4..7b89e6f88c 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 b/NodeFirefox/Dockerfile index 955ee24d91..1f9e06b6df 100644 --- a/NodeFirefox/Dockerfile +++ b/NodeFirefox/Dockerfile @@ -37,7 +37,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/NodeFirefox/Dockerfile.txt b/NodeFirefox/Dockerfile.txt index a1ee6a28e3..ac0245b12f 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/NodeFirefoxDebug/Dockerfile b/NodeFirefoxDebug/Dockerfile index ba44115e78..de739c973b 100644 --- a/NodeFirefoxDebug/Dockerfile +++ b/NodeFirefoxDebug/Dockerfile @@ -24,7 +24,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/NodeOpera/Dockerfile b/NodeOpera/Dockerfile index 2164ca4b7b..44d3aff938 100644 --- a/NodeOpera/Dockerfile +++ b/NodeOpera/Dockerfile @@ -39,7 +39,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/NodeOpera/Dockerfile.txt b/NodeOpera/Dockerfile.txt index 9d2189341a..cbd82ff36f 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/NodeOperaDebug/Dockerfile b/NodeOperaDebug/Dockerfile index 3e03bc008d..88738febcf 100644 --- a/NodeOperaDebug/Dockerfile +++ b/NodeOperaDebug/Dockerfile @@ -24,7 +24,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/Standalone/Dockerfile.txt b/Standalone/Dockerfile.txt index 22c00fa7fa..bc39fb4ff0 100644 --- a/Standalone/Dockerfile.txt +++ b/Standalone/Dockerfile.txt @@ -1,4 +1,4 @@ -USER seluser +USER 1200 #==================================== # Scripts to run Selenium Standalone diff --git a/StandaloneChrome/Dockerfile b/StandaloneChrome/Dockerfile index f7d441a6c0..7567d4f145 100644 --- a/StandaloneChrome/Dockerfile +++ b/StandaloneChrome/Dockerfile @@ -5,7 +5,7 @@ FROM selenium/node-chrome:3.141.59-20200525 LABEL authors=SeleniumHQ -USER seluser +USER 1200 #==================================== # Scripts to run Selenium Standalone diff --git a/StandaloneChromeDebug/Dockerfile b/StandaloneChromeDebug/Dockerfile index 7035f77cd3..1ba8972cc1 100644 --- a/StandaloneChromeDebug/Dockerfile +++ b/StandaloneChromeDebug/Dockerfile @@ -5,7 +5,7 @@ FROM selenium/node-chrome-debug:3.141.59-20200525 LABEL authors=SeleniumHQ -USER seluser +USER 1200 #==================================== # Scripts to run Selenium Standalone diff --git a/StandaloneFirefox/Dockerfile b/StandaloneFirefox/Dockerfile index a558ded856..c82eb2de42 100644 --- a/StandaloneFirefox/Dockerfile +++ b/StandaloneFirefox/Dockerfile @@ -5,7 +5,7 @@ FROM selenium/node-firefox:3.141.59-20200525 LABEL authors=SeleniumHQ -USER seluser +USER 1200 #==================================== # Scripts to run Selenium Standalone diff --git a/StandaloneFirefoxDebug/Dockerfile b/StandaloneFirefoxDebug/Dockerfile index b292eaaa81..19b9a293ca 100644 --- a/StandaloneFirefoxDebug/Dockerfile +++ b/StandaloneFirefoxDebug/Dockerfile @@ -5,7 +5,7 @@ FROM selenium/node-firefox-debug:3.141.59-20200525 LABEL authors=SeleniumHQ -USER seluser +USER 1200 #==================================== # Scripts to run Selenium Standalone diff --git a/StandaloneOpera/Dockerfile b/StandaloneOpera/Dockerfile index b37fe0e21b..67a58b2892 100644 --- a/StandaloneOpera/Dockerfile +++ b/StandaloneOpera/Dockerfile @@ -5,7 +5,7 @@ FROM selenium/node-opera:3.141.59-20200525 LABEL authors=SeleniumHQ -USER seluser +USER 1200 #==================================== # Scripts to run Selenium Standalone diff --git a/StandaloneOperaDebug/Dockerfile b/StandaloneOperaDebug/Dockerfile index 43b9f8c907..77779074c5 100644 --- a/StandaloneOperaDebug/Dockerfile +++ b/StandaloneOperaDebug/Dockerfile @@ -5,7 +5,7 @@ FROM selenium/node-opera-debug:3.141.59-20200525 LABEL authors=SeleniumHQ -USER seluser +USER 1200 #==================================== # Scripts to run Selenium Standalone