-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Closed
Labels
@aws-cdk/aws-lambda-nodejseffort/smallSmall work item – less than a day of effortSmall work item – less than a day of effortfeature-requestA feature should be added or improved.A feature should be added or improved.in-progressThis issue is being actively worked on.This issue is being actively worked on.
Description
Since moving to use docker container to build the source of lambda-nodejs, the users might have problem to downloading the dependencies in docker build.
Use Case
When I synthesis/deploy a CDK app with lambda-nodejs code in China. I failed to build the source code of lambda-nodejs due to network issue in Docker container.
See error message below,
Failed to build file at /path/assets/ecs-task-def/ecs.ts: Error: [Status 1] stdout: Sending build context to Docker daemon 2.048kB
Step 1/5 : ARG NODE_TAG
Step 2/5 : FROM node:${NODE_TAG}
---> 87c43f8d8077
Step 3/5 : RUN yarn global add parcel-bundler@^1
---> Running in 29b5567d211a
yarn global v1.22.4
[1/4] Resolving packages...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
error An unexpected error occurred: "https://registry.yarnpkg.com/parcel-bundler: ETIMEDOUT".
info If you think this is a bug, please open a bug report with the information provided in "/usr/local/share/.config/yarn/global/yarn-error.log".
Actually I can install the dependencies manually via proxy server in earlier CDK versions.
Proposed Solution
Docker build supports specifying build arguments about proxy like below,
docker build --build-arg HTTP_PROXY=$http_proxy \
--build-arg HTTPS_PROXY=$http_proxy
docker run --env HTTP_PROXY=$http_proxy \
--env HTTPS_PROXY=$http_proxy
Add a capability to support the user specifying the builder arguments or directly passing the proxy arguments if they are set in env.
Other
- 👋 I may be able to implement this feature request
-
⚠️ This feature might incur a breaking change
This is a 🚀 Feature Request
jogold and zxkane
Metadata
Metadata
Assignees
Labels
@aws-cdk/aws-lambda-nodejseffort/smallSmall work item – less than a day of effortSmall work item – less than a day of effortfeature-requestA feature should be added or improved.A feature should be added or improved.in-progressThis issue is being actively worked on.This issue is being actively worked on.