-
Notifications
You must be signed in to change notification settings - Fork 4k
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
feat(ecr-assets): Support .dockerignore (faster Docker builds) #4104
Conversation
Thanks so much for taking the time to contribute to the AWS CDK ❤️ We will shortly assign someone to review this pull request and help get it
|
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please follow the PR checklist and let us know when this is ready for a review.
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please revert all unnecessary changes and add an explicit test to verify .dockerignore behavior
@eladb done, sounds like we need some lint updates :) |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! Your pull request is now being automatically merged. |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
* Support .dockerignore (faster Docker builds) * ts fix * test update and lint fix * exclude dockerignore so it does not influence hashing * tweaks * remove verify from other test * revert * more revert
It seems we do not handle common "exclude everything except" pattern for
With the current implementation the first 'star' glob effectively excludes everything from the asset folder. |
bump, regarding not supporting pattern @kolomied brought up. |
@yurigorokhov I believe the problem was addressed in #4450 |
If your Dockerfile lives in the project root, CDK will copy ALL files (node_modules, etc) into the cdk out folder prior to running the
docker build
command (which is super slow). Docker has support for a.dockerignore
file that ignores files/directories when building the context:https://docs.docker.com/engine/reference/builder/#dockerignore-file