-
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
lambda.LayerVersion: missing DNS when building a layer with docker #29371
Comments
In your bundling settings, add network=host and try again (without tweaking resolve.conf). |
tried this before, tried it now - not working
|
Try to execute the pip install separately from CDK. Might be an issue with your Docker install. Here's my test:
|
This doesn't seem to be a bug from CDK but we need more inputs from here. |
Retried in a non-corporate environment, it works without the hack. |
|
Describe the bug
That hack
'echo "nameserver 8.8.8.8" > /etc/resolv.conf
is necessary to allow pip to fetch packages from the internet.Expected Behavior
echo "nameserver 8.8.8.8" > /etc/resolv.conf
is not necessary, and it works just out of the boxCurrent Behavior
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘NewConnectionError(‘<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f9779c5c6b0>: Failed to establish a new connection: [Errno -2] Name or service not known’)’: /simple/jmespath/
Reproduction Steps
Stack without the hack.
Possible Solution
--dns
parameter should be a parameter tobuilding
https://docs.docker.com/network/
Additional Information/Context
No response
CDK CLI Version
2.126.0 (build fb74c41)
Framework Version
No response
Node.js Version
9.6.7
OS
Ubuntu 20.04
Language
TypeScript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: