feat(ecr-assets): Support .dockerignore (faster Docker builds)#4104
feat(ecr-assets): Support .dockerignore (faster Docker builds)#4104mergify[bot] merged 12 commits intoaws:masterfrom
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 |
eladb
left a comment
There was a problem hiding this comment.
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 |
eladb
left a comment
There was a problem hiding this comment.
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 buildcommand (which is super slow). Docker has support for a.dockerignorefile that ignores files/directories when building the context:https://docs.docker.com/engine/reference/builder/#dockerignore-file