Hello,
Do we have the possibility to pass an environment variable to the docker.run() function ?
Thanks
Sure just pass the env option in run's "create_options".
Check https://github.com/apocas/dockerode#equivalent-of-docker-run-in-dockerode
For those looking for an example...
docker.run('test:latest', ['node', '/root/test.js'], [process.stdout, process.stderr], {Tty: false, env: ['NODE_ENV=development']}, function(error, data, container) {
...
});
Most helpful comment
For those looking for an example...
Source: http://stackoverflow.com/a/24792554/83897