(@aws-cdk/aws-lambda-python): (docker based bundling does not work on mounted docker socket) #21506
Labels
@aws-cdk/aws-lambda-python
bug
This issue is a bug.
needs-triage
This issue or PR still needs to be triaged.
Describe the bug
In the case when CDK is running within a container, that has
/var/run/docker.sock
mounted in from the host system, bundling the python lambda will fail.This is a bit of a unusual setup, but I've seen in very often in CI/CD systems, so I thinks its very relevant.
This is similar to #11230
Expected Behavior
The bundling and depdency management works as usual, if the docker daemon is running in the same machine.
Current Behavior
error output
Further output can be found at the job lob at https://gitlab.com/webratz/cdk-python-budle/-/jobs/2828110048
Reproduction Steps
I have created a repo at https://gitlab.com/webratz/cdk-python-budle/ that contains the code and all CI configuration.
The runner there will only be up for 1 week as its in a playground account that gets clean up weekly.
The README there and the
.gitlab-ci.yml
contains additional info on how things are executed.Possible Solution
Using
--volumes-from=$HOSTNAME
docker parameterI had a quick look through the CDK code, but I'm not sure how it would be possible to pass that in.
Additional Information/Context
This is not directly related to gitlab, i've seen this kind of setup already with several other setups, eg Jenkins.
If you need access to reproduce this I can grant access to the gitlab repo.
CDK CLI Version
2.35.0 (build 5c23578)
Framework Version
No response
Node.js Version 16
OS
Linux / Debian
Language
Typescript
Language Version
No response
Other information
related: #11230
The text was updated successfully, but these errors were encountered: