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