File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -64,17 +64,11 @@ RUN apt-get install -qy \
6464 yang-tools \
6565 zsh
6666
67- # Install chromedriver
68- RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \
69- echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list && \
70- apt-get update -y && \
71- apt-get install -y google-chrome-stable && \
72- CHROMEVER=$(google-chrome --product-version | grep -o "[^\. ]*\. [^\. ]*\. [^\. ]*" ) && \
73- DRIVERVER=$(curl -s "https://chromedriver.storage.googleapis.com/LATEST_RELEASE_$CHROMEVER" ) && \
74- wget -q --continue -P /chromedriver "http://chromedriver.storage.googleapis.com/$DRIVERVER/chromedriver_linux64.zip" && \
75- unzip /chromedriver/chromedriver* -d /chromedriver && \
76- ln -s /chromedriver/chromedriver /usr/local/bin/chromedriver && \
77- ln -s /chromedriver/chromedriver /usr/bin/chromedriver
67+ # Install chromedriver if supported
68+ COPY docker/scripts/app-install-chromedriver.sh /tmp/app-install-chromedriver.sh
69+ RUN sed -i 's/\r $//' /tmp/app-install-chromedriver.sh && \
70+ chmod +x /tmp/app-install-chromedriver.sh
71+ RUN /tmp/app-install-chromedriver.sh
7872
7973# Get rid of installation files we don't need in the image, to reduce size
8074RUN apt-get clean && rm -rf /var/lib/apt/lists/*
Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ services:
3939 # (Adding the "ports" property to this file will not forward from a Codespace.)
4040
4141 db :
42+ # image: ghcr.io/ngpixel/datatracker-db:nightly-20211208
4243 build :
4344 context : ..
4445 dockerfile : docker/db.Dockerfile
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ HOSTARCH=$( arch)
4+ if [ $HOSTARCH == " x86_64" ]; then
5+ echo " Installing chrome driver..."
6+ wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
7+ echo " deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list
8+ apt-get update -y
9+ apt-get install -y google-chrome-stable
10+ CHROMEVER=$( google-chrome --product-version | grep -o " [^\.]*\.[^\.]*\.[^\.]*" )
11+ DRIVERVER=$( curl -s " https://chromedriver.storage.googleapis.com/LATEST_RELEASE_$CHROMEVER " )
12+ wget -q --continue -P /chromedriver " http://chromedriver.storage.googleapis.com/$DRIVERVER /chromedriver_linux64.zip"
13+ unzip /chromedriver/chromedriver* -d /chromedriver
14+ ln -s /chromedriver/chromedriver /usr/local/bin/chromedriver
15+ ln -s /chromedriver/chromedriver /usr/bin/chromedriver
16+ else
17+ echo " This architecture doesn't support chromedriver. Skipping installation..."
18+ fi
You can’t perform that action at this time.
0 commit comments