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. |
dgageot
left a comment
There was a problem hiding this comment.
Overall, it's great. A few things can be improved.
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
.dockerignorefiles. For example, this is the behavior with the following context:before:
dockerwould respectDockerfile.dev.dockerignorebutskaffoldwould not take it into account when producing dependencies, and syncing could break e.g. if.dockerignorehid files used byDockerfile.dev.dockerignore, leading to unexpected behavior.after:
skaffoldwill makeDockerfile.dev.dockerignoretake precedence over.dockerignore(will fall back to.dockerignoreif it doesn't exist).