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

DockerImageAsset: environmental variables #28692

Open
2 tasks
austinmw opened this issue Jan 12, 2024 · 5 comments
Open
2 tasks

DockerImageAsset: environmental variables #28692

austinmw opened this issue Jan 12, 2024 · 5 comments
Labels
@aws-cdk/aws-ecr-assets Related to AWS CDK Docker Image Assets effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p3

Comments

@austinmw
Copy link

austinmw commented Jan 12, 2024

Describe the feature

Is it possible to include environmental variables in the docker build? I don't see it included here: https://docs.aws.amazon.com/cdk/api/v2/python/aws_cdk.aws_ecr_assets/DockerImageAsset.html

Use Case

I would like to include the following env vars when building docker images with CDK:

DOCKER_BUILDKIT=1
CDK_DOCKER=finch

Proposed Solution

No response

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

CDK version used

latest

Environment details (OS name and version, etc.)

MacOS

@austinmw austinmw added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Jan 12, 2024
@michaelwiles
Copy link
Contributor

michaelwiles commented Jan 13, 2024

Is it possible to do this with docker build?

@austinmw
Copy link
Author

As is, I would need to add to the app instructions to export these env vars before calling CDK deploy.

@pahud
Copy link
Contributor

pahud commented Jan 16, 2024

Does it help to export that before the cdk deploy like?

export DOCKER_BUILDKIT=1
npx cdk synth

@pahud pahud added p2 effort/medium Medium work item – several days of effort and removed needs-triage This issue or PR still needs to be triaged. labels Jan 16, 2024
@pahud pahud added the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Jan 16, 2024
@austinmw
Copy link
Author

@pahud Sure it works to explicitly export env vars, but I was hoping they could be defined in the build process.

@github-actions github-actions bot removed the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Jan 16, 2024
@pahud pahud added p3 and removed p2 labels Jun 11, 2024
@adminy
Copy link

adminy commented Aug 13, 2024

any updates on this? Sounds like an important feature to have.

@moelasmar moelasmar added the @aws-cdk/aws-ecr-assets Related to AWS CDK Docker Image Assets label Aug 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-ecr-assets Related to AWS CDK Docker Image Assets effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p3
Projects
None yet
Development

No branches or pull requests

6 participants