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
1919 && rm /etc/apt/sources.list.d/google-chrome.list \
2020 && rm -rf /var/lib/apt/lists/* /var/cache/apt/*
2121
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+
2228USER seluser
2329
2430#============================================
@@ -40,10 +46,5 @@ RUN CD_VERSION=$(if [ ${CHROME_DRIVER_VERSION:-latest} = "latest" ]; then echo $
4046
4147COPY generate_config /opt/bin/generate_config
4248
43- #=================================
44- # Chrome Launch Script Modification
45- #=================================
46- COPY chrome_launcher.sh /opt/google/chrome/google-chrome
47-
4849# Generating a default config during build time
4950RUN /opt/bin/generate_config > /opt/selenium/config.json
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11#! /bin/bash
22
3- CHROME_VERSION=$( /opt/google/chrome/ chrome -version | awk ' { print $3 }' )
3+ CHROME_VERSION=$( /usr/bin/google- chrome -version | awk ' { print $3 }' )
44
55cat << _EOF
66{
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