Created
December 23, 2021 09:56
-
-
Save jackblk/daf6da984d572768784ba4f85afde7fc to your computer and use it in GitHub Desktop.
Install latest firefox and geckodriver in Docker Alpine. Headless Firefox works for both AMD64 and ARM64.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ================== Install Firefox & Driver ================== | |
RUN apk add --no-cache firefox-esr | |
# Install Geckodriver | |
SHELL ["/bin/ash", "-eo", "pipefail", "-c"] | |
RUN apk add --no-cache --virtual .build-deps wget \ | |
&& GECKODRIVER_VERSION=$(wget -qO- https://api.github.com/repos/mozilla/geckodriver/releases/latest \ | |
| grep "tag_name" | sed -E 's/.*"([^"]+)".*/\1/') \ | |
&& wget -qO /tmp/geckodriver.tar.gz \ | |
"https://github.com/mozilla/geckodriver/releases/download/$GECKODRIVER_VERSION/geckodriver-$GECKODRIVER_VERSION-linux64.tar.gz" \ | |
&& tar -xzf /tmp/geckodriver.tar.gz -C /usr/local/bin/ \ | |
&& rm /tmp/geckodriver.tar.gz \ | |
&& apk del .build-deps |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment