R
Railway3y ago
gabe

Access env variables inside Dockerfile

I'm trying to create a dockerfile which needs access to an env variable to properly build (its not needed for the app itself). I read that I could use the ARG command and pass the variable through docker --build-arg <ARG>, but this still doesn't seem to use the environment variables, as I still need to additionally pass it through the --build-arg flag (and I'm not sure if I can do that through railway). Am i missing something? I just wanted to do something like
# Clone the separate lists repo
ARG GIT_LISTS_HTTPS_REPO
RUN git clone $GIT_LISTS_HTTPS_REPO .
# Clone the separate lists repo
ARG GIT_LISTS_HTTPS_REPO
RUN git clone $GIT_LISTS_HTTPS_REPO .
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server