Skip to content

Commit 66913db

Browse files
authored
Merge pull request #64 from UnitedIncome/docker-uid-on-linux-only
Only pass UID option to Docker on Linux
2 parents 0cd8a05 + 9a7cda0 commit 66913db

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
@@ -82,10 +82,11 @@ class ServerlessPythonRequirements {
8282

8383
options = [
8484
'run', '--rm',
85-
'-u', process.getuid() + ':' + process.getgid(),
8685
'-v', `${this.serverless.config.servicePath}:/var/task:z`,
8786
`${image}`,
8887
];
88+
if (process.platform === 'linux')
89+
options.push('-u', `${process.getuid()}:${process.getgid()}`);
8990
options.push(...pipCmd);
9091
} else {
9192
cmd = pipCmd[0];

0 commit comments

Comments
 (0)