Skip to content

Commit 4c1b2b5

Browse files
committed
docker in docker fix
1 parent a7769a3 commit 4c1b2b5

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

lib/pip.js

+7-2
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,13 @@ function installRequirements(
8686
}
8787
serverless.cli.log(`Docker Image: ${dockerImage}`);
8888

89-
// Prepare bind path depending on os platform
90-
const bindPath = getBindPath(servicePath);
89+
let bindPath;
90+
if (options.dockerInDocker) {
91+
bindPath = process.env['host_pwd'];
92+
} else {
93+
// Prepare bind path depending on os platform
94+
bindPath = getBindPath(servicePath);
95+
}
9196

9297
cmdOptions = ['run', '--rm', '-v', `"${bindPath}:/var/task:z"`];
9398
if (options.dockerSsh) {

0 commit comments

Comments
 (0)