From d09179522ecd42ce4ee218d54d98c37e805419a1 Mon Sep 17 00:00:00 2001 From: Jas Kalayan Date: Tue, 1 Dec 2026 14:27:27 +0000 Subject: [PATCH] =?UTF-8?q?build(docker):=20avoid=20GitHub=E2=80=99s=20una?= =?UTF-8?q?uthenticated=20API=20rate=20limit=20for=20biosim-extractor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker/Dockerfile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index fc024ae..0652798 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -7,9 +7,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends curl jq tar ca- WORKDIR /tmp -RUN TAG=$(curl -fsSL https://api.github.com/repos/CCPBioSim/biosim-schema/releases/latest | jq -r .tag_name) && \ - curl -fsSL -o artifacts.tar.gz \ - "https://github.com/CCPBioSim/biosim-schema/releases/download/${TAG}/biosim-schema-artifacts.tar.gz" && \ +RUN curl -fsSL -o artifacts.tar.gz \ + "https://github.com/CCPBioSim/biosim-schema/releases/latest/download/biosim-schema-artifacts.tar.gz" && \ mkdir -p /opt/biosim-schema && \ tar -xzf artifacts.tar.gz -C /opt/biosim-schema @@ -46,7 +45,7 @@ RUN pip install --upgrade pip RUN pip install --no-cache-dir setuptools==84.2.1 gunicorn==27.0.1 # ensure latest version of biosim-extractor is installed in container RUN pip install --no-cache-dir . && \ - TAG=$(python3 -c "import json,urllib.request as u; print(json.load(u.urlopen('https://api.github.com/repos/CCPBioSim/biosim-extractor/releases/latest'))['tag_name'])") && \ + TAG=$(python3 -c "from urllib.request import urlopen; u = urlopen('https://github.com/CCPBioSim/biosim-extractor/releases/latest').geturl(); prefix = 'https://github.com/CCPBioSim/biosim-extractor/releases/tag/'; assert u.startswith(prefix), f'Unexpected release URL: {u}'; print(u[len(prefix):])") && \ pip install --no-cache-dir --upgrade "https://github.com/CCPBioSim/biosim-extractor/archive/refs/tags/${TAG}.tar.gz" # Stage 3: Runtime