Skip to content

Commit

Permalink
Use jq to make parsing GECKODRIVER API call reproducible
Browse files Browse the repository at this point in the history
Signed-off-by: Greg Sutcliffe <[email protected]>
  • Loading branch information
GregSutcliffe committed Nov 1, 2024
1 parent 065ef64 commit 2a2e4d4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions docker/backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ RUN set -x \
cargo \
chromium \
tar \
jq \
chromium-driver \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
Expand All @@ -39,7 +40,7 @@ RUN set -x \
&& apt-get install -y firefox-esr

# Install Geckodriver
RUN GECKODRIVER_VERSION=$(curl -s https://api.github.com/repos/mozilla/geckodriver/releases/latest | grep 'tag_name' | cut -d\" -f4 | sed 's/v//') \
RUN GECKODRIVER_VERSION=$(curl -s https://api.github.com/repos/mozilla/geckodriver/releases/latest | jq -r '.tag_name' | sed 's/v//') \
&& ARCH=$(uname -m) \
&& if [ "$ARCH" = "aarch64" ]; then \
GECKODRIVER_URL="https://github.com/mozilla/geckodriver/releases/download/v${GECKODRIVER_VERSION}/geckodriver-v${GECKODRIVER_VERSION}-linux-aarch64.tar.gz"; \
Expand Down Expand Up @@ -111,4 +112,4 @@ COPY ./docker/backend/init.sh /
RUN chmod +x /entrypoint.sh /init.sh
ENTRYPOINT ["/bin/bash", "/entrypoint.sh"]
#ENTRYPOINT ["/entrypoint.sh"]
CMD /init.sh
CMD /init.sh

0 comments on commit 2a2e4d4

Please sign in to comment.