-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
(assets): EXTREMELY slow bundling with docker. #19230
Comments
Note also that I am using |
Same here, we also use a docker image to build our functions and the container performs much slower than what it would if I do a normal docker run |
Same issue here
Edit: In my case I was accidentally using docker bundling because I forgot to install esbuild with npm. I'm not sure if my initial comment could still be relevant so i'll leave it up. |
CDK CLI Version: 2.74.0 I get the same issue too, bundling that normally takes 5 seconds suddenly takes 4-10 minutes just sitting there. For the same project I haven't seen this under Linux, only when using WSL2 under Windows 11. My only work around right now is to stop Rancher Desktop, completely restart WSL2 by Restarting the 'LxssManager' Windows Service, the start Rancher Desktop again. After that docker bundling will work at normal speed for a few builds before eventually going funny again. My (total guess) suspicion is this is related to how bundling is done by CDK. Instead of a normal docker build where the files are copied into the container, CDK directly mounts the build files folder into the container. I suspect some Windows/WSL2/docker file mounting drama eventually causes severe delays to file operations. I am also suspicious of Visual Studio Code's WSL support. Sometime I can quickly fix the problem just by deleting the 'bin' and 'obj' folders from the build directory that CDL mounts into docker. But that is very hit or miss, can't tie it down yet. |
I'm having the same issue. |
Facing same issue on latest versions on CDK |
General Issue
I have a lambda nodejs function that is taking over half an hour to bundle.
The Question
I have seen the other github issues complaining about docker bundling taking 20 seconds up to around 4 minutes. I am experiencing bundling taking several times longer than that.
I need to copy some assets (fonts and images) after bundling, and I need to include
pdfkit
binaries to I can do operations on PDFs in my Lambda function. This works and functions just fine, but bundling takes FOREVER. I am writing this issue while waiting forcdk deploy
.Here is what my terminal looks like:
I have no idea why it is taking so long.
CDK CLI Version
1.121
Framework Version
1.144
Node.js Version
14
OS
macOs
Language
Typescript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: