Skip to content

Commit 817860d

Browse files
committedAug 23, 2017
Only pass UID option to Docker on Linux
closes #62 and closes #21
1 parent 6daeb4a commit 817860d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed
 

‎index.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,13 @@ class ServerlessPythonRequirements {
107107

108108
options = [
109109
'run', '--rm',
110-
'-u', process.getuid() + ':' + process.getgid(),
111110
'-v', `${this.serverless.config.servicePath}:/var/task:z`,
112111
`${image}`,
113112
];
113+
if (process.platform === 'linux') {
114+
options.push('-u');
115+
options.push(`${process.getuid()}:${process.getgid()}`);
116+
}
114117
options.push(...pipCmd);
115118
} else {
116119
cmd = pipCmd[0];

0 commit comments

Comments
 (0)
Failed to load comments.