Skip to content

Commit 9a7cda0

Browse files
committed
Only pass UID option to Docker on Linux
closes #62 and closes #21
1 parent 6daeb4a commit 9a7cda0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

index.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,11 @@ 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', `${process.getuid()}:${process.getgid()}`);
114115
options.push(...pipCmd);
115116
} else {
116117
cmd = pipCmd[0];

0 commit comments

Comments
 (0)