Skip to content

Commit

Permalink
fix geckodriver install (#261)
Browse files Browse the repository at this point in the history
* fix geckodriver install

* update
  • Loading branch information
Uunnamed authored Aug 3, 2020
1 parent a3aab07 commit d370c6c
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,13 @@ RUN FIREFOX_URI="https://download.mozilla.org/?product=firefox-latest&os=linux64
ln -s /usr/local/firefox/firefox /usr/local/bin/firefox

# Install Geckodriver
RUN GECKODRIVER_URL=https://github.com/mozilla/geckodriver/releases/download && \
VERSION=$(curl -sL https://api.github.com/repos/mozilla/geckodriver/releases/latest | \
grep tag_name | cut -d '"' -f 4) && \
curl -sL "$GECKODRIVER_URL/$VERSION/geckodriver-$VERSION-linux64.tar.gz" | \
tar -xz -C /usr/local/bin
RUN GECKODRIVER_META="https://api.github.com/repos/mozilla/geckodriver/releases/latest" && \
GECKODRIVER_LATEST_RELEASE_URL=$(curl $GECKODRIVER_META | jq -r ".assets[] | select(.content_type==\"application/gzip\") | select(.name | test(\"linux64\")) | .browser_download_url") && \
curl --silent --show-error --location --fail --retry 3 --output /tmp/geckodriver_linux64.tar.gz "$GECKODRIVER_LATEST_RELEASE_URL" && \
cd /tmp && \
tar xf geckodriver_linux64.tar.gz && \
chmod +x geckodriver && \
mv geckodriver /usr/local/bin/

WORKDIR /etaoin
COPY ./ ./
Expand Down

0 comments on commit d370c6c

Please sign in to comment.