-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
(assets): support drop-in docker replacements #21836
Labels
@aws-cdk/assets
Related to the @aws-cdk/assets package
effort/small
Small work item – less than a day of effort
feature-request
A feature should be added or improved.
in-progress
This issue is being actively worked on.
p1
Comments
4 tasks
Thanks for the pr @misterjoshua, someone from the team will try to take a look soon 🙂 |
mergify bot
pushed a commit
that referenced
this issue
Sep 23, 2022
…CKER` (#21838) This PR introduces the ability for users to change the command used for building and publishing Docker images to a drop-in replacement like the [Depot](https://depot.dev) Docker shim. To change the docker command, the user provides the alternative command via an environment variable named `CDK_DOCKER`. There's already something similar in `core`'s asset bundling, but it applies only to bundling and not to building and publishing Docker image assets. https://github.com/aws/aws-cdk/blob/3e55092fb70e0ec74ee7c4144d6e39a29d8757ae/packages/%40aws-cdk/core/lib/bundling.ts#L523 Fixes #21836 ---- ### All Submissions: * [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)? * [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* Depends-On: #22194
|
homakk
pushed a commit
to homakk/aws-cdk
that referenced
this issue
Dec 1, 2022
…CKER` (aws#21838) This PR introduces the ability for users to change the command used for building and publishing Docker images to a drop-in replacement like the [Depot](https://depot.dev) Docker shim. To change the docker command, the user provides the alternative command via an environment variable named `CDK_DOCKER`. There's already something similar in `core`'s asset bundling, but it applies only to bundling and not to building and publishing Docker image assets. https://github.com/aws/aws-cdk/blob/3e55092fb70e0ec74ee7c4144d6e39a29d8757ae/packages/%40aws-cdk/core/lib/bundling.ts#L523 Fixes aws#21836 ---- ### All Submissions: * [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)? * [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* Depends-On: aws#22194
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
@aws-cdk/assets
Related to the @aws-cdk/assets package
effort/small
Small work item – less than a day of effort
feature-request
A feature should be added or improved.
in-progress
This issue is being actively worked on.
p1
Describe the feature
I'd like the ability to change the docker command used when building/publishing assets.
Use Case
I'd like to use Depot's Docker shim as a drop-in replacement for the
docker
command so I can take advantage of their faster docker builds.Proposed Solution
We could obtain a user-specified override from an environment variable named
CDK_DOCKER
here:aws-cdk/packages/cdk-assets/lib/private/docker.ts
Line 134 in 7472fa4
Environment variables would be nice because these are easy to add to the build/deploy environment without changing customers' apps. There's precedence for this in core with
CDK_DOCKER
, but that environment variable only applies to bundling and not to docker image asset builds/publishing.aws-cdk/packages/@aws-cdk/core/lib/bundling.ts
Line 523 in 3e55092
Other Information
I've attempted to add this feature in #21838
Acknowledgements
CDK version used
N/A
Environment details (OS name and version, etc.)
Linux
The text was updated successfully, but these errors were encountered: