File tree Expand file tree Collapse file tree 4 files changed +20
-93
lines changed Expand file tree Collapse file tree 4 files changed +20
-93
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,12 @@ 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
+ #=================================
23
+ # Chrome Launch Script Wrapper
24
+ #=================================
25
+ COPY wrap_chrome_binary /opt/bin/wrap_chrome_binary
26
+ RUN /opt/bin/wrap_chrome_binary
27
+
22
28
USER seluser
23
29
24
30
#============================================
@@ -40,10 +46,5 @@ RUN CD_VERSION=$(if [ ${CHROME_DRIVER_VERSION:-latest} = "latest" ]; then echo $
40
46
41
47
COPY generate_config /opt/bin/generate_config
42
48
43
- #=================================
44
- # Chrome Launch Script Modification
45
- #=================================
46
- COPY chrome_launcher.sh /opt/google/chrome/google-chrome
47
-
48
49
# Generating a default config during build time
49
50
RUN /opt/bin/generate_config > /opt/selenium/config.json
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
- CHROME_VERSION=$( /opt/google/chrome/ chrome -version | awk ' { print $3 }' )
3
+ CHROME_VERSION=$( /usr/bin/google- chrome -version | awk ' { print $3 }' )
4
4
5
5
cat << _EOF
6
6
{
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ WRAPPER_PATH=$( readlink -f /usr/bin/google-chrome)
4
+ BASE_PATH=" $WRAPPER_PATH -base"
5
+ mv " $WRAPPER_PATH " " $BASE_PATH "
6
+
7
+ cat > " $WRAPPER_PATH " << _EOF
8
+ #!/bin/bash
9
+
10
+ # Note: exec -a below is a bashism.
11
+ exec -a "\$ 0" "$BASE_PATH " --no-sandbox "\$ @"
12
+ _EOF
13
+ chmod +x " $WRAPPER_PATH "
You can’t perform that action at this time.
0 commit comments