-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[aws-lambda] Bundling code fails with Docker error 125 (wrong flag provided) starting from 1.61.0 #10262
Comments
@jogold can you take a look? |
What happens when you specify an describe('Test', () => {
const app = new App({
outdir: './cdk.out' // <-- this
});
}); and then can you try replacing
or replace the file at |
@jarikujansuu have you been able to try it? |
When running unit tests `outdir` defaults to a temporary directory in the system temp directory. On macOS `os.tmpdir()` is a symlink so bundling in Docker fails. Fix it by using `fs.realpathSync`. Closes aws#10262
When running unit tests `outdir` defaults to a temporary directory in the system temp directory. On macOS `os.tmpdir()` is a symlink. In `v1.61.0` we changed the bundling directory to be a directory inside `outdir` (`cdk.out`). This makes Docker bundling fail during tests. Fix it by using `fs.realpathSync`. Closes #10262 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Hi, |
When trying to run tests that contain Lambda get error with Docker code 125. Tested different versions from 1.55.0 to current 1.62.0 and error seems to appear in
1.61.0
Running Docker version 19.03.12, build 48a66213fe on MacOS 10.14.6
Reproduction Steps
PythonFunction wrapper might be unnecessary in newer versions but it was when submitted earlier bug about it. Of course needs something in Lambda directory too.
What did you expect to happen?
Test should run and lambda should be bundled using Docker.
What actually happened?
Failed to bundle asset MyTestStack/Function/Code/Stage, bundle output is located at /var/folders/q6/myync74s6y3d56dsbdt4xtgh0000gn/T/cdk.outVZd5d7/asset.96d820282efdb1403c735a823a6797110cd117197eca021f6037be7bed0cf9d2-error: Error: docker exited with status 125
Environment
Other
This is 🐛 Bug Report
The text was updated successfully, but these errors were encountered: