Even though we can calculate all the dependencies, users might not want to (or be able to) watch all dependencies for a large project. We should figure out how we want to expose a ignore functionality to the user
https://github.com/GoogleCloudPlatform/skaffold/pull/15#discussion_r165719716
ref #50
And similarly, perhaps a regex include option configurable for each artifact? I've got a node monorepo that requires me to bundle files before running docker build.
+1 This feature is kind of important, but also there may be some default optimizations that can go within skaffold, for example right now, simply adding a file to the git index with git add triggers a rebuild in skaffold, which is wasteful to say the least. Can we ignore some directories like .git by default or maybe honor existing ignore files like .dockerignore
We use .dockerignore to ignore some development symlinks, and skaffold tries to walk them and fails on this line https://github.com/GoogleContainerTools/skaffold/blob/master/vendor/github.com/karrick/godirwalk/walk.go#L197, even though it builds just fine in Docker. It would be great if Skaffold could honor existing .dockerignore files.
@hach-que Skaffold does try to honor existing .dockerignore files. Do you have an example of a failure?
hey everyone, this issue is one of our oldest still around! i'm not totally convinced based on the evidence here that this is a feature we need in skaffold, and our team likely won't be prioritizing it anytime soon. i'm going to mark it for closure now - that said, if anyone has evidence for why we need to build this in skaffold or examples of where we're falling short, please drop them in here!
Would love to see this feature. I have to delegate the build step to a custom script and every time the target/ directory is regenerated for maven projects it'll just get stuck in an infinite loop of building and deploying.
EDIT: This feature does exist as a build configuration. Posting here as Google takes us to these issues rather than the relevant docs:
dependencies:
paths: [src]
ignore: [target]
Most helpful comment
We use .dockerignore to ignore some development symlinks, and skaffold tries to walk them and fails on this line https://github.com/GoogleContainerTools/skaffold/blob/master/vendor/github.com/karrick/godirwalk/walk.go#L197, even though it builds just fine in Docker. It would be great if Skaffold could honor existing .dockerignore files.