I am using docker to run node server.js
In terminal, I execute docker run --env-file .env -p 8080:8080 -d node-web-app and I am trying to use process.env in server.js to get environment variables in docker
However, RangeError: Invalid status code: 0 occurs.
How can I fix it and get the environment variables in docker?
Thanks in advance.
-
check if the variable is correctly set in docker container! use this to connecto to bash and then check for variable.Mohsen ZareZardeyni– Mohsen ZareZardeyni2016-11-26 21:17:30 +00:00Commented Nov 26, 2016 at 21:17
Add a comment
|