File tree Expand file tree Collapse file tree 2 files changed +13
-10
lines changed Expand file tree Collapse file tree 2 files changed +13
-10
lines changed Original file line number Diff line number Diff line change
1
+ USER seluser
2
+
1
3
#========================
2
4
# Selenium Configuration
3
5
#========================
@@ -21,11 +23,12 @@ ENV GRID_TIMEOUT 30
21
23
# Debug
22
24
ENV GRID_DEBUG false
23
25
24
- COPY generate_config /opt/selenium/generate_config
25
- COPY entry_point.sh /opt/bin/entry_point.sh
26
- RUN /opt/selenium/generate_config > /opt/selenium/config.json
27
- RUN chown -R seluser /opt/selenium
28
-
29
- USER seluser
26
+ COPY generate_config \
27
+ entry_point.sh \
28
+ /opt/bin/
29
+ # Running this command as sudo just to avoid the message:
30
+ # To run a command as administrator (user "root"), use "sudo <command>". See "man sudo_root" for details.
31
+ # When logging into the container
32
+ RUN sudo /opt/bin/generate_config > /home/seluser/selenium/config.json
30
33
31
34
CMD ["/opt/bin/entry_point.sh"]
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
- ROOT=/opt /selenium
3
+ ROOT=/home/seluser /selenium
4
4
CONF=$ROOT /config.json
5
5
6
- $ROOT /generate_config > $CONF
6
+ /opt/bin /generate_config > $CONF
7
7
8
8
echo " starting selenium hub with configuration:"
9
9
cat $CONF
@@ -19,11 +19,11 @@ function shutdown {
19
19
echo " shutdown complete"
20
20
}
21
21
22
- java ${JAVA_OPTS} -jar /opt /selenium/selenium-server-standalone.jar \
22
+ java ${JAVA_OPTS} -jar /home/seluser /selenium/selenium-server-standalone.jar \
23
23
-role hub \
24
24
-hubConfig $CONF \
25
25
${SE_OPTS} &
26
26
NODE_PID=$!
27
27
28
28
trap shutdown SIGTERM SIGINT
29
- wait $NODE_PID
29
+ wait $NODE_PID
You can’t perform that action at this time.
0 commit comments