Skip to content

Commit 92c6e3f

Browse files
author
Bruno Galindro da Costa
committed
Add environment variables to docker run cmd
1 parent 01c1fb1 commit 92c6e3f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/pip.js

+8
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,14 @@ function installRequirements(
103103
cmdOptions.push('-v', `${process.env.SSH_AUTH_SOCK}:/tmp/ssh_sock:z`);
104104
cmdOptions.push('-e', 'SSH_AUTH_SOCK=/tmp/ssh_sock');
105105
}
106+
if (options.dockerEnv) {
107+
// Add environment variables to docker run cmd
108+
options.dockerEnv.forEach(
109+
function(item) {
110+
cmdOptions.push('-e', item);
111+
}
112+
);
113+
}
106114
if (process.platform === 'linux') {
107115
// Use same user so requirements folder is not root and so --cache-dir works
108116
cmdOptions.push('-u', `${process.getuid()}`);

0 commit comments

Comments
 (0)