Skip to content

Commit

Permalink
ensuring env variable from build arg
Browse files Browse the repository at this point in the history
  • Loading branch information
turnmanh committed May 23, 2024
1 parent 1e8c9a1 commit 8618ab8
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -74,16 +74,14 @@ LABEL org.opencontainers.image.source="https://github.com/aai-institute/tfl-trai
ARG PARTICIPANT_BUCKET_READ_SECRET
ENV PARTICIPANT_BUCKET_READ_SECRET=${PARTICIPANT_BUCKET_READ_SECRET}

# RUN if [ -z "$PARTICIPANT_BUCKET_READ_SECRET" ]; \
# then echo "The build arg PARTICIPANT_BUCKET_READ_SECRET must be set to non-zero, e.g. \
# by passing the flag --build-arg PARTICIPANT_BUCKET_READ_SECRET=$PARTICIPANT_BUCKET_READ_SECRET. " &&\
# echo "If running in CI, this variable should have been included as GH secret in the repository settings." &&\
# echo "If you are building locally and the env var is not set, \
# you might find the corresponding value inside config.yml under the 'secret' key." &&\
# exit 1; \
# fi

RUN echo "PARTICIPANT_BUCKET_READ_SECRET: $PARTICIPANT_BUCKET_READ_SECRET"
RUN if [ -z "$PARTICIPANT_BUCKET_READ_SECRET" ]; \
then echo "The build arg PARTICIPANT_BUCKET_READ_SECRET must be set to non-zero, e.g. \
by passing the flag --build-arg PARTICIPANT_BUCKET_READ_SECRET=$PARTICIPANT_BUCKET_READ_SECRET. " &&\
echo "If running in CI, this variable should have been included as GH secret in the repository settings." &&\
echo "If you are building locally and the env var is not set, \
you might find the corresponding value inside config.yml under the 'secret' key." &&\
exit 1; \
fi

RUN apt update -y && \
apt install -y \
Expand Down

0 comments on commit 8618ab8

Please sign in to comment.