Skip to content
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

cdk-assets: Improve error message when docker is not installed and CDK_DOCKER is not set. #25657

Open
vsiravar opened this issue May 19, 2023 · 3 comments
Labels
@aws-cdk/integ-tests bug This issue is a bug. documentation This is a problem with documentation. effort/small Small work item – less than a day of effort p2

Comments

@vsiravar
Copy link

Describe the bug

When docker is not installed and a user wants to use a drop in replacement, if the user does not set CDK_DOCKER=, the error message says "Unable to execute 'docker' in order to build a container asset. Please install 'docker' and try again." https://github.com/aws/aws-cdk/blob/main/packages/cdk-assets/lib/private/docker.ts#L186

Expected Behavior

Error message should inform users about CDK_DOCKER environment variable which can be set to support drop in replacements for docker.

Current Behavior

Error message is very docker specific. "Unable to execute 'docker' in order to build a container asset. Please install 'docker' and try again."

Reproduction Steps

  1. Uninstall docker.
  2. Clone https://github.com/aws/aws-cdk/
  3. yarn install
  4. NODE_OPTIONS=--max-old-space-size=8192 npx lerna run build --scope=aws-cdk-lib --scope=@aws-cdk-testing/framework-integ
  5. cd packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test && node integ.bundling.js

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.79.1 (build 2e7f8b7)

Framework Version

No response

Node.js Version

v18.16.0

OS

macOS 13.3.1

Language

Typescript

Language Version

No response

Other information

No response

@vsiravar vsiravar added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels May 19, 2023
@khushail khushail added the investigating This issue is being investigated and/or work is in progress to resolve the issue. label May 22, 2023
@khushail khushail self-assigned this May 22, 2023
@pahud
Copy link
Contributor

pahud commented May 22, 2023

Yes we should add CDK_DOCKER in our document or contributing guide. But at this moment, according to the Setup of the contributing guide, Docker >=19.03 with the running daemon is required.

@pahud
Copy link
Contributor

pahud commented May 22, 2023

related to #23680 (comment)

@pahud pahud added documentation This is a problem with documentation. effort/small Small work item – less than a day of effort and removed needs-triage This issue or PR still needs to be triaged. labels May 22, 2023
@khushail khushail removed the investigating This issue is being investigated and/or work is in progress to resolve the issue. label May 22, 2023
@khushail khushail removed their assignment May 22, 2023
@vsiravar
Copy link
Author

Makes sense, should it additionally be added to the error message as well, informing the user to either set CDK_DOCKER or have a docker daemon running when either of the dependencies are not configured?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/integ-tests bug This issue is a bug. documentation This is a problem with documentation. effort/small Small work item – less than a day of effort p2
Projects
None yet
Development

No branches or pull requests

3 participants