mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-26 17:49:15 +01:00
added chromedriver
This commit is contained in:
18
backend/scripts/install-chromedriver.sh
Normal file
18
backend/scripts/install-chromedriver.sh
Normal file
@@ -0,0 +1,18 @@
|
||||
export DEBIAN_FRONTEND=noninteractive \
|
||||
&& apt-get update \
|
||||
&& apt-get install \
|
||||
unzip \
|
||||
&& \
|
||||
DL=https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb \
|
||||
&& curl -sL "$DL" > /tmp/chrome.deb \
|
||||
&& apt install --no-install-recommends --no-install-suggests -y \
|
||||
/tmp/chrome.deb \
|
||||
&& CHROMIUM_FLAGS='--no-sandbox --disable-dev-shm-usage' \
|
||||
# Patch Chrome launch script and append CHROMIUM_FLAGS to the last line:
|
||||
&& sed -i '${s/$/'" $CHROMIUM_FLAGS"'/}' /opt/google/chrome/google-chrome \
|
||||
&& BASE_URL=https://chromedriver.storage.googleapis.com \
|
||||
&& VERSION=$(curl -sL "$BASE_URL/LATEST_RELEASE") \
|
||||
&& curl -sL "$BASE_URL/$VERSION/chromedriver_linux64.zip" -o /tmp/driver.zip \
|
||||
&& unzip /tmp/driver.zip \
|
||||
&& chmod 755 chromedriver \
|
||||
&& mv chromedriver /usr/local/bin
|
||||
Reference in New Issue
Block a user