Skip to content

Commit

Permalink
fix installation geckodriver in docker (#258)
Browse files Browse the repository at this point in the history
  • Loading branch information
Uunnamed authored Aug 2, 2020
1 parent 35f94c6 commit 0a10250
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,11 @@ 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_META="https://api.github.com/repos/mozilla/geckodriver/releases/latest" && \
GECKODRIVER_LATEST_RELEASE_URL=$(curl $GECKODRIVER_META | jq -r ".assets[] | 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/
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

WORKDIR /etaoin
COPY ./ ./
Expand Down

0 comments on commit 0a10250

Please sign in to comment.