From 2a2e4d41dbb7ecb4fcf37ac09ac4bf7dc316a382 Mon Sep 17 00:00:00 2001 From: Greg Sutcliffe Date: Fri, 1 Nov 2024 11:16:04 +0000 Subject: [PATCH] Use jq to make parsing GECKODRIVER API call reproducible Signed-off-by: Greg Sutcliffe --- docker/backend/Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docker/backend/Dockerfile b/docker/backend/Dockerfile index aaace9b36..90be0a624 100644 --- a/docker/backend/Dockerfile +++ b/docker/backend/Dockerfile @@ -28,6 +28,7 @@ RUN set -x \ cargo \ chromium \ tar \ + jq \ chromium-driver \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* \ @@ -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"; \ @@ -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 \ No newline at end of file +CMD /init.sh