File tree Expand file tree Collapse file tree 8 files changed +15
-11
lines changed Expand file tree Collapse file tree 8 files changed +15
-11
lines changed Original file line number Diff line number Diff line change @@ -41,11 +41,15 @@ RUN echo "${TZ}" > /etc/timezone \
41
41
&& dpkg-reconfigure --frontend noninteractive tzdata
42
42
43
43
# ========================================
44
- # Add normal user with passwordless sudo
44
+ # Add normal user and group with passwordless sudo
45
45
# ========================================
46
- RUN useradd seluser \
47
- --shell /bin/bash \
46
+ RUN groupadd seluser \
47
+ --gid 1201 \
48
+ && useradd seluser \
48
49
--create-home \
50
+ --gid 1201 \
51
+ --shell /bin/bash \
52
+ --uid 1200 \
49
53
&& usermod -a -G sudo seluser \
50
54
&& echo 'ALL ALL = (ALL) NOPASSWD: ALL' >> /etc/sudoers \
51
55
&& echo 'seluser:secret' | chpasswd
@@ -75,7 +79,7 @@ RUN mkdir -p /opt/selenium /var/run/supervisor /var/log/supervisor \
75
79
# ===================================================
76
80
# Run the following commands as non-privileged user
77
81
# ===================================================
78
- USER seluser
82
+ USER 1200:1201
79
83
80
84
81
85
CMD ["/opt/bin/entry_point.sh" ]
Original file line number Diff line number Diff line change 1
- USER seluser
1
+ USER 1200
2
2
3
3
#========================
4
4
# Selenium Configuration
Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ RUN apt-get -qqy update \
68
68
# Run the following commands as non-privileged user
69
69
#===================================================
70
70
71
- USER seluser
71
+ USER 1200
72
72
73
73
#==============================
74
74
# 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
25
25
COPY wrap_chrome_binary /opt/bin/wrap_chrome_binary
26
26
RUN /opt/bin/wrap_chrome_binary
27
27
28
- USER seluser
28
+ USER 1200
29
29
30
30
#============================================
31
31
# Chrome webdriver
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ RUN apt-get update -qqy \
17
17
fluxbox \
18
18
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/*
19
19
20
- USER seluser
20
+ USER 1200
21
21
22
22
#==============================
23
23
# Generating the VNC password as seluser
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.
30
30
&& chmod 755 /opt/geckodriver-$GK_VERSION \
31
31
&& ln -fs /opt/geckodriver-$GK_VERSION /usr/bin/geckodriver
32
32
33
- USER seluser
33
+ USER 1200
34
34
35
35
COPY generate_config /opt/bin/generate_config
36
36
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 - \
32
32
COPY wrap_opera_binary /opt/bin/wrap_opera_binary
33
33
RUN /opt/bin/wrap_opera_binary
34
34
35
- USER seluser
35
+ USER 1200
36
36
37
37
#=====================
38
38
# Opera webdriver
Original file line number Diff line number Diff line change 1
- USER seluser
1
+ USER 1200
2
2
3
3
#====================================
4
4
# Scripts to run Selenium Standalone
You can’t perform that action at this time.
0 commit comments