@@ -19,17 +19,19 @@ RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key
19
19
&& rm /etc/apt/sources.list.d/google-chrome.list \
20
20
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/*
21
21
22
+ USER seluser
23
+
22
24
#==================
23
25
# Chrome webdriver
24
26
#==================
25
27
ARG CHROME_DRIVER_VERSION=2.29
26
28
RUN wget --no-verbose -O /tmp/chromedriver_linux64.zip https://chromedriver.storage.googleapis.com/$CHROME_DRIVER_VERSION/chromedriver_linux64.zip \
27
- && rm -rf /opt /selenium/chromedriver \
28
- && unzip /tmp/chromedriver_linux64.zip -d /opt /selenium \
29
+ && rm -rf /home/seluser /selenium/chromedriver \
30
+ && unzip /tmp/chromedriver_linux64.zip -d /home/seluser /selenium \
29
31
&& rm /tmp/chromedriver_linux64.zip \
30
- && mv /opt/ selenium/chromedriver /opt /selenium/chromedriver-$CHROME_DRIVER_VERSION \
31
- && chmod 755 /opt /selenium/chromedriver-$CHROME_DRIVER_VERSION \
32
- && ln -fs /opt /selenium/chromedriver-$CHROME_DRIVER_VERSION /usr/bin/chromedriver
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
33
35
34
36
#========================
35
37
# Selenium Configuration
@@ -51,18 +53,12 @@ ENV NODE_DOWN_POLLING_LIMIT 2
51
53
# As string, maps to "applicationName"
52
54
ENV NODE_APPLICATION_NAME ""
53
55
54
- COPY generate_config /opt/selenium/generate_config
55
- RUN chmod +x /opt/selenium/generate_config
56
+ COPY generate_config /opt/bin/generate_config
56
57
57
58
#=================================
58
59
# Chrome Launch Script Modification
59
60
#=================================
60
61
COPY chrome_launcher.sh /opt/google/chrome/google-chrome
61
- RUN chmod +x /opt/google/chrome/google-chrome
62
-
63
- RUN chown -R seluser:seluser /opt/selenium
64
62
65
63
# Following line fixes https://github.com/SeleniumHQ/docker-selenium/issues/87
66
64
ENV DBUS_SESSION_BUS_ADDRESS=/dev/null
67
-
68
- USER seluser
0 commit comments