-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Description
Using volumes in Docker on Mac specifically is a huge pain point due to performance issues. CPU often spikes to above 100% utilization when there is heavy read or write operations inside the container (as it happens with the parcel-builder Docker container that the CDK construct NodejsFunction uses internally.
This has been very well documented in https://docs.docker.com/docker-for-mac/osxfs-caching/ and the workarounds are also described.
I suggest we force Docker volume mounts within this construct to start using Docker volume in "delegated" mode, to improve build performance (speed) on Mac based deployment environments.
I think a good starting point is:
https://github.com/aws/aws-cdk/blob/master/packages/%40aws-cdk/aws-lambda-nodejs/lib/builder.ts#L118
Use Case
Developing and deploying CDK stacks with many lambdas on a Mac machine.
Proposed Solution
Replace -v sourcevolume:targetvolume with -v sourcevolume:targetvolume:delegated
Other
- 👋 I may be able to implement this feature request
-
⚠️ This feature might incur a breaking change
This is a 🚀 Feature Request