Pass environment variables to Docker directly
Anonymous
2 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.
2 Replies
yangptenPRO
4 months ago
I also have this question
4 months 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.