Skip to content

Commit 0f12883

Browse files
committed
Switching back to the previous Selenium files path.
1 parent b0a1991 commit 0f12883

File tree

8 files changed

+23
-21
lines changed

8 files changed

+23
-21
lines changed

Base/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,12 @@ RUN useradd seluser \
5050
# Run the following commands as non-privileged user
5151
#===================================================
5252
USER seluser
53-
WORKDIR /home/seluser
5453

5554
#==========
5655
# Selenium
5756
#==========
58-
RUN mkdir -p /home/seluser/selenium \
57+
RUN sudo mkdir -p /opt/selenium \
58+
&& sudo chown seluser:seluser /opt/selenium \
5959
&& wget --no-verbose https://selenium-release.storage.googleapis.com/3.4/selenium-server-standalone-3.4.0.jar \
60-
-O /home/seluser/selenium/selenium-server-standalone.jar
60+
-O /opt/selenium/selenium-server-standalone.jar
6161

Hub/Dockerfile.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,6 @@ COPY generate_config \
2929
# Running this command as sudo just to avoid the message:
3030
# To run a command as administrator (user "root"), use "sudo <command>". See "man sudo_root" for details.
3131
# When logging into the container
32-
RUN sudo /opt/bin/generate_config > /home/seluser/selenium/config.json
32+
RUN sudo /opt/bin/generate_config > /opt/selenium/config.json
3333

3434
CMD ["/opt/bin/entry_point.sh"]

Hub/entry_point.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
ROOT=/home/seluser/selenium
3+
ROOT=/opt/selenium
44
CONF=$ROOT/config.json
55

66
/opt/bin/generate_config >$CONF
@@ -19,7 +19,7 @@ function shutdown {
1919
echo "shutdown complete"
2020
}
2121

22-
java ${JAVA_OPTS} -jar /home/seluser/selenium/selenium-server-standalone.jar \
22+
java ${JAVA_OPTS} -jar /opt/selenium/selenium-server-standalone.jar \
2323
-role hub \
2424
-hubConfig $CONF \
2525
${SE_OPTS} &

NodeBase/entry_point.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
#!/bin/bash
22

33
source /opt/bin/functions.sh
4-
/opt/bin/generate_config > /home/seluser/selenium/config.json
4+
/opt/bin/generate_config > /opt/selenium/config.json
55

66
export GEOMETRY="$SCREEN_WIDTH""x""$SCREEN_HEIGHT""x""$SCREEN_DEPTH"
77

8-
if [ ! -e /home/seluser/selenium/config.json ]; then
8+
if [ ! -e /opt/selenium/config.json ]; then
99
echo No Selenium Node configuration file, the node-base image is not intended to be run directly. 1>&2
1010
exit 1
1111
fi
@@ -34,10 +34,10 @@ SERVERNUM=$(get_server_num)
3434
rm -f /tmp/.X*lock
3535

3636
xvfb-run -n $SERVERNUM --server-args="-screen 0 $GEOMETRY -ac +extension RANDR" \
37-
java ${JAVA_OPTS} -jar /home/seluser/selenium/selenium-server-standalone.jar \
37+
java ${JAVA_OPTS} -jar /opt/selenium/selenium-server-standalone.jar \
3838
-role node \
3939
-hub http://$HUB_PORT_4444_TCP_ADDR:$HUB_PORT_4444_TCP_PORT/grid/register \
40-
-nodeConfig /home/seluser/selenium/config.json \
40+
-nodeConfig /opt/selenium/config.json \
4141
${SE_OPTS} &
4242
NODE_PID=$!
4343

NodeChrome/Dockerfile.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ USER seluser
2626
#==================
2727
ARG CHROME_DRIVER_VERSION=2.29
2828
RUN wget --no-verbose -O /tmp/chromedriver_linux64.zip https://chromedriver.storage.googleapis.com/$CHROME_DRIVER_VERSION/chromedriver_linux64.zip \
29-
&& rm -rf /home/seluser/selenium/chromedriver \
30-
&& unzip /tmp/chromedriver_linux64.zip -d /home/seluser/selenium \
29+
&& rm -rf /opt/selenium/chromedriver \
30+
&& unzip /tmp/chromedriver_linux64.zip -d /opt/selenium \
3131
&& rm /tmp/chromedriver_linux64.zip \
32-
&& mv /home/seluser/selenium/chromedriver /home/seluser/selenium/chromedriver-$CHROME_DRIVER_VERSION \
33-
&& chmod 755 /home/seluser/selenium/chromedriver-$CHROME_DRIVER_VERSION \
34-
&& sudo ln -fs /home/seluser/selenium/chromedriver-$CHROME_DRIVER_VERSION /usr/bin/chromedriver
32+
&& mv /opt/selenium/chromedriver /opt/selenium/chromedriver-$CHROME_DRIVER_VERSION \
33+
&& chmod 755 /opt/selenium/chromedriver-$CHROME_DRIVER_VERSION \
34+
&& sudo ln -fs /opt/selenium/chromedriver-$CHROME_DRIVER_VERSION /usr/bin/chromedriver
3535

3636
COPY generate_config /opt/bin/generate_config
3737

NodeDebug/entry_point.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
# IMPORTANT: Change this file only in directory NodeDebug!
44

55
source /opt/bin/functions.sh
6-
/opt/bin/generate_config > /home/seluser/selenium/config.json
6+
/opt/bin/generate_config > /opt/selenium/config.json
77

88
export GEOMETRY="$SCREEN_WIDTH""x""$SCREEN_HEIGHT""x""$SCREEN_DEPTH"
99

10-
if [ ! -e /home/seluser/selenium/config.json ]; then
10+
if [ ! -e /opt/selenium/config.json ]; then
1111
echo No Selenium Node configuration file, the node-base image is not intended to be run directly. 1>&2
1212
exit 1
1313
fi
@@ -37,10 +37,10 @@ rm -f /tmp/.X*lock
3737

3838
DISPLAY=$DISPLAY \
3939
xvfb-run -n $SERVERNUM --server-args="-screen 0 $GEOMETRY -ac +extension RANDR" \
40-
java ${JAVA_OPTS} -jar /home/seluser/selenium/selenium-server-standalone.jar \
40+
java ${JAVA_OPTS} -jar /opt/selenium/selenium-server-standalone.jar \
4141
-role node \
4242
-hub http://$HUB_PORT_4444_TCP_ADDR:$HUB_PORT_4444_TCP_PORT/grid/register \
43-
-nodeConfig /home/seluser/selenium/config.json \
43+
-nodeConfig /opt/selenium/config.json \
4444
${SE_OPTS} &
4545
NODE_PID=$!
4646

Standalone/entry_point.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
#!/bin/bash
2+
#
3+
# IMPORTANT: Change this file only in directory Standalone!
24

35
source /opt/bin/functions.sh
46

@@ -18,7 +20,7 @@ SERVERNUM=$(get_server_num)
1820
rm -f /tmp/.X*lock
1921

2022
xvfb-run -n $SERVERNUM --server-args="-screen 0 $GEOMETRY -ac +extension RANDR" \
21-
java ${JAVA_OPTS} -jar /home/seluser/selenium/selenium-server-standalone.jar \
23+
java ${JAVA_OPTS} -jar /opt/selenium/selenium-server-standalone.jar \
2224
${SE_OPTS} &
2325
NODE_PID=$!
2426

StandaloneDebug/entry_point.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ SERVERNUM=$(get_server_num)
2121

2222
DISPLAY=$DISPLAY \
2323
xvfb-run -n $SERVERNUM --server-args="-screen 0 $GEOMETRY -ac +extension RANDR" \
24-
java ${JAVA_OPTS} -jar /home/seluser/selenium/selenium-server-standalone.jar \
24+
java ${JAVA_OPTS} -jar /opt/selenium/selenium-server-standalone.jar \
2525
${SE_OPTS} &
2626
NODE_PID=$!
2727

0 commit comments

Comments
 (0)