Skip to content

Commit

Permalink
fix(AWS Local Invocation): Fix Dockerfile layer path on Windows (#8273)
Browse files Browse the repository at this point in the history
  • Loading branch information
gliptak committed Sep 22, 2020
1 parent 4f96ce1 commit 0164327
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/plugins/aws/invokeLocal/index.js
Expand Up @@ -370,7 +370,9 @@ class AwsInvokeLocal {

let dockerFileContent = `FROM lambci/lambda:${runtime}`;
for (const layerPath of layerPaths) {
dockerFileContent += `\nADD --chown=sbx_user1051:495 ${layerPath} /opt`;
dockerFileContent += `\nADD --chown=sbx_user1051:495 ${
os.platform() === 'win32' ? layerPath.replace(/\\/g, '/') : layerPath
} /opt`;
}

const dockerfilePath = path.join('.serverless', 'invokeLocal', runtime, 'Dockerfile');
Expand Down

0 comments on commit 0164327

Please sign in to comment.