Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use a numeric USER instruction in Dockerfiles #1073

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions Base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"]
2 changes: 1 addition & 1 deletion Hub/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
FROM selenium/base:3.141.59-20200525
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please only change the Dockerfile.txt files?

LABEL authors=SeleniumHQ

USER seluser
USER 1200

#========================
# Selenium Configuration
Expand Down
2 changes: 1 addition & 1 deletion Hub/Dockerfile.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
USER seluser
USER 1200

#========================
# Selenium Configuration
Expand Down
2 changes: 1 addition & 1 deletion NodeBase/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ RUN apt-get -qqy update \
# Run the following commands as non-privileged user
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please only change the Dockerfile.txt files?

#===================================================

USER seluser
USER 1200

#==============================
# Scripts to run Selenium Node and XVFB
Expand Down
2 changes: 1 addition & 1 deletion NodeBase/Dockerfile.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion NodeChrome/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please only change the Dockerfile.txt files?


#============================================
# Chrome webdriver
Expand Down
2 changes: 1 addition & 1 deletion NodeChrome/Dockerfile.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion NodeChromeDebug/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ RUN apt-get update -qqy \
fluxbox \
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/*

USER seluser
USER 1200
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please only change the Dockerfile.txt files?


#==============================
# Generating the VNC password as seluser
Expand Down
2 changes: 1 addition & 1 deletion NodeDebug/Dockerfile.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion NodeFirefox/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please only change the Dockerfile.txt files?

COPY generate_config /opt/bin/generate_config

Expand Down
2 changes: 1 addition & 1 deletion NodeFirefox/Dockerfile.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion NodeFirefoxDebug/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ RUN apt-get update -qqy \
fluxbox \
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/*

USER seluser
USER 1200

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please only change the Dockerfile.txt files?

#==============================
# Generating the VNC password as seluser
Expand Down
2 changes: 1 addition & 1 deletion NodeOpera/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please only change the Dockerfile.txt files?

#=====================
# Opera webdriver
Expand Down
2 changes: 1 addition & 1 deletion NodeOpera/Dockerfile.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion NodeOperaDebug/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ RUN apt-get update -qqy \
fluxbox \
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/*

USER seluser
USER 1200

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please only change the Dockerfile.txt files?

#==============================
# Generating the VNC password as seluser
Expand Down
2 changes: 1 addition & 1 deletion Standalone/Dockerfile.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
USER seluser
USER 1200

#====================================
# Scripts to run Selenium Standalone
Expand Down
2 changes: 1 addition & 1 deletion StandaloneChrome/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
FROM selenium/node-chrome:3.141.59-20200525
LABEL authors=SeleniumHQ

USER seluser
USER 1200

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please only change the Dockerfile.txt files?

#====================================
# Scripts to run Selenium Standalone
Expand Down
2 changes: 1 addition & 1 deletion StandaloneChromeDebug/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
FROM selenium/node-chrome-debug:3.141.59-20200525
LABEL authors=SeleniumHQ

USER seluser
USER 1200

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please only change the Dockerfile.txt files?

#====================================
# Scripts to run Selenium Standalone
Expand Down
2 changes: 1 addition & 1 deletion StandaloneFirefox/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
FROM selenium/node-firefox:3.141.59-20200525
LABEL authors=SeleniumHQ

USER seluser
USER 1200

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please only change the Dockerfile.txt files?

#====================================
# Scripts to run Selenium Standalone
Expand Down
2 changes: 1 addition & 1 deletion StandaloneFirefoxDebug/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
FROM selenium/node-firefox-debug:3.141.59-20200525
LABEL authors=SeleniumHQ

USER seluser
USER 1200

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please only change the Dockerfile.txt files?

#====================================
# Scripts to run Selenium Standalone
Expand Down
2 changes: 1 addition & 1 deletion StandaloneOpera/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
FROM selenium/node-opera:3.141.59-20200525
LABEL authors=SeleniumHQ

USER seluser
USER 1200

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please only change the Dockerfile.txt files?

#====================================
# Scripts to run Selenium Standalone
Expand Down
2 changes: 1 addition & 1 deletion StandaloneOperaDebug/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
FROM selenium/node-opera-debug:3.141.59-20200525
LABEL authors=SeleniumHQ

USER seluser
USER 1200

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please only change the Dockerfile.txt files?

#====================================
# Scripts to run Selenium Standalone
Expand Down