Skip to content

Instantly share code, notes, and snippets.

  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
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.
# ================== 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