File tree Expand file tree Collapse file tree 10 files changed +17
-13
lines changed Expand file tree Collapse file tree 10 files changed +17
-13
lines changed Original file line number Diff line number Diff line change @@ -41,11 +41,15 @@ RUN echo "${TZ}" > /etc/timezone \
4141 && dpkg-reconfigure --frontend noninteractive tzdata
4242
4343# ========================================
44- # Add normal user with passwordless sudo
44+ # Add normal user and group with passwordless sudo
4545# ========================================
46- RUN useradd seluser \
47- --shell /bin/bash \
46+ RUN groupadd seluser \
47+ --gid 1201 \
48+ && useradd seluser \
4849 --create-home \
50+ --gid 1201 \
51+ --shell /bin/bash \
52+ --uid 1200 \
4953 && usermod -a -G sudo seluser \
5054 && echo 'ALL ALL = (ALL) NOPASSWD: ALL' >> /etc/sudoers \
5155 && echo 'seluser:secret' | chpasswd
@@ -75,7 +79,7 @@ RUN mkdir -p /opt/selenium /var/run/supervisor /var/log/supervisor \
7579# ===================================================
7680# Run the following commands as non-privileged user
7781# ===================================================
78- USER seluser
82+ USER 1200:1201
7983
8084
8185CMD ["/opt/bin/entry_point.sh" ]
Original file line number Diff line number Diff line change 1- USER seluser
1+ USER 1200
22
33#========================
44# Selenium Configuration
Original file line number Diff line number Diff line change 1- USER seluser
1+ USER 1200
22
33#========================
44# Selenium Configuration
Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ RUN apt-get -qqy update \
8585# Run the following commands as non-privileged user
8686#===================================================
8787
88- USER seluser
88+ USER 1200
8989
9090#==============================
9191# Scripts to run Selenium Node and XVFB
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key
2525COPY wrap_chrome_binary /opt/bin/wrap_chrome_binary
2626RUN /opt/bin/wrap_chrome_binary
2727
28- USER seluser
28+ USER 1200
2929
3030#============================================
3131# Chrome webdriver
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ RUN GK_VERSION=$(if [ ${GECKODRIVER_VERSION:-latest} = "latest" ]; then echo "0.
3030 && chmod 755 /opt/geckodriver-$GK_VERSION \
3131 && ln -fs /opt/geckodriver-$GK_VERSION /usr/bin/geckodriver
3232
33- USER seluser
33+ USER 1200
3434
3535COPY generate_config /opt/bin/generate_config
3636
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ RUN wget -q -O - https://deb.opera.com/archive.key | apt-key add - \
3232COPY wrap_opera_binary /opt/bin/wrap_opera_binary
3333RUN /opt/bin/wrap_opera_binary
3434
35- USER seluser
35+ USER 1200
3636
3737#=====================
3838# Opera webdriver
Original file line number Diff line number Diff line change 1- USER seluser
1+ USER 1200
22
33#========================
44# Selenium Configuration
Original file line number Diff line number Diff line change 1- USER seluser
1+ USER 1200
22
33#========================
44# Selenium Configuration
Original file line number Diff line number Diff line change 1- USER seluser
1+ USER 1200
22
33#====================================
44# Scripts to run Selenium Standalone
You can’t perform that action at this time.
0 commit comments