I have a Node.js application which is built into the docker image. In this application I have a config file with some API urls (API key, for example) which might change from time to time. Is it possible to launch the docker image with some additional parameter and then access this param from the node.js code (I assume this could be done through using environment vars) so as not to rebuild the image every time the value of this param should be changed. This is the pseudo code which I assume can be used:
docker run -p 8080:8080 paramApiKey="12345" mydockerimage
and then I'd like to access it from the node.js app:
var apiKey = process.env.paramApiKey
Can this somehow be achieved?