From 070a5c653611e887402f937327538ac40d5116b7 Mon Sep 17 00:00:00 2001 From: Thomas Luechtefeld Date: Sun, 28 Jul 2024 19:15:24 -0400 Subject: [PATCH] fix default biobricks token in dockerfile --- .devcontainer/Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 2454ee1..3cdfe31 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -43,7 +43,10 @@ COPY .devcontainer/requirements.txt /tmp/requirements.txt RUN pip install -r /tmp/requirements.txt # Accept build argument for BIOBRICKS_TOKEN & set to the default value if it is not given. -ARG BIOBRICKS_TOKEN=VQF6Q2U-NKktZ31ioVYa9w +ARG BIOBRICKS_TOKEN +ENV DEFAULT_TOKEN=VQF6Q2U-NKktZ31ioVYa9w +ENV BIOBRICKS_TOKEN=${BIOBRICKS_TOKEN:-${DEFAULT_TOKEN}} +RUN if [ ${#BIOBRICKS_TOKEN} -lt 5 ]; then export BIOBRICKS_TOKEN=$DEFAULT_TOKEN; fi # Install biobricks and configure it RUN /bin/bash -c 'source /etc/bash.bashrc && pipx install biobricks && biobricks version' \