aws / aws/aws-cdk

(core): add tag parameter to BundlingDockerImage.from_asset to tag the docker image and keep it cached

Open
#11,936 3 comments 1 reaction 0 assignees View on GitHub
@aws-cdk/core effort/medium feature-request p2
Dominant language
TypeScript
Stars
12.9k
Forks
4.6k
Avg merge
2d 3h
Merged PRs (30d)
83

Description

It would be nice if the `from_asset` method in `BundlingDockerImage` could accept a tag (or similar) parameter and use that to tag the docker image that it's building.

### Use Case

Currently, the output image is completely untagged, which leads to it getting deleted whenever I run `docker image prune` and then CDK has to rebuild it from scratch the next time I run deploy.

### Proposed Solution

If CDK tags the image, it will keep the latest version (or all if the tag changes) saved locally to act as a build cache for future builds, saving on build time.

### Other

* [ ] :wave: I may be able to implement this feature request
* [ ] :warning: This feature might incur a breaking change

---

This is a :rocket: Feature Request

Contributor guide

Open the contributing guide

Research direction

Start at the BundlingDockerImage.from_asset entry point and trace how its Docker image is built and named. Review related bundling tests if available; done means the method accepts a tag-like parameter and the resulting image remains locally available for later Docker builds.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, typescript
Domain
build-system
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.