-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Support Dockerfile.dockerignore #3837
Support Dockerfile.dockerignore #3837
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
@googlebot I signed it! |
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
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.
Overall, it's great. A few things can be improved.
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.
Thanks for the suggestions @dgageot, fixed your comments.
Codecov Report
|
Weird, integration tests failed at first but they succeeded after restarting. |
Fixes: Did not create an issue for this, please let me know if I should.
Description
Add support for getting dependencies from Dockerfile.dockerignore files. See e.g. moby/buildkit#901 . Since the same code produces dependencies for Kaniko I expect this will also make Skaffold align better with Kaniko (GoogleContainerTools/kaniko#801).
User facing changes
Users with multiple Dockerfiles will now be able to have different
.dockerignore
files. For example, this is the behavior with the following context:before:
docker
would respectDockerfile.dev.dockerignore
butskaffold
would not take it into account when producing dependencies, and syncing could break e.g. if.dockerignore
hid files used byDockerfile.dev.dockerignore
, leading to unexpected behavior.after:
skaffold
will makeDockerfile.dev.dockerignore
take precedence over.dockerignore
(will fall back to.dockerignore
if it doesn't exist).