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

aws-ecr-assets: docker image build with no-cache option #20555

Closed
2 tasks
cloneluke opened this issue May 31, 2022 · 6 comments
Closed
2 tasks

aws-ecr-assets: docker image build with no-cache option #20555

cloneluke opened this issue May 31, 2022 · 6 comments
Assignees
Labels
@aws-cdk/aws-ecr-assets Related to AWS CDK Docker Image Assets cause/not-a-bug Not a bug (might still be a documentation issue, might still need work) feature-request A feature should be added or improved. p2

Comments

@cloneluke
Copy link

Describe the feature

We use DockerImageAsset to build an ECR image via aws cdk. I would like to force a build using --no-cache, (we have side scripts that change so we do want the docker build to start completely fresh)
It doesn't look like there is a way to do this so I was thinking of opening a github feature request
https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ecr_assets.DockerImageAsset.html

docker build --no-cache option: https://docs.docker.com/engine/reference/commandline/build/

Use Case

Able to force a full rebuild due to changes not detected by docker.

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

2.22.0

Environment details (OS name and version, etc.)

windows client, debian container

@cloneluke cloneluke added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels May 31, 2022
@github-actions github-actions bot added the @aws-cdk/aws-ecr-assets Related to AWS CDK Docker Image Assets label May 31, 2022
@indrora indrora added p2 cause/not-a-bug Not a bug (might still be a documentation issue, might still need work) and removed needs-triage This issue or PR still needs to be triaged. labels Jul 20, 2022
@indrora indrora self-assigned this Jul 20, 2022
@indrora
Copy link
Contributor

indrora commented Jul 20, 2022

You can manually specify additional flags to docker build using the buildArgs property.

@indrora
Copy link
Contributor

indrora commented Jul 21, 2022

I take that back: buildArgs are not passed directly to Docker build, upon closer inspection.

@peterwoodworth
Copy link
Contributor

Pretty sure buildArgs are passed directly to the docker build based on my previous deep dives, and what the documentation says. If anyone still thinks we need to support this, please open a new feature request

@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

@seruminar
Copy link

seruminar commented May 11, 2023

@peterwoodworth

buildArgs produces

  • docker build --build-arg --no-cache=
    and we want
  • docker build --no-cache

@austinmw
Copy link

austinmw commented Nov 9, 2023

@peterwoodworth Any update on this?

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 cause/not-a-bug Not a bug (might still be a documentation issue, might still need work) feature-request A feature should be added or improved. p2
Projects
None yet
Development

No branches or pull requests

6 participants