Pass environment variables to Docker directly
Anonymous

3 years ago

Currently, environment variables are passed to docker through build arguments as described in https://docs.railway.app/deploy/dockerfiles. Although this is sometimes useful, most of the time I just want to pass the environment variables directly into the docker environment. This is done locally with docker run -e MY_VAR=123 and requires no modification to the Dockerfile.

Solved

2 Replies

yangpten
PRO

a year ago

I also have this question


a year ago

docker run -e MY_VAR=123 is done by default and always has been.

If you are experiencing issues, please open your own help thread.


Welcome!

Sign in to your Railway account to join the conversation.

Loading...