I'm using Skaffold filesync with NodeJS hotreload and its working pretty fine, except that the image gets rebuild even if I didn't change any files.
I suppose the reason for that is that VSCode does a git fetch in the background, and updates the .git folder (as shown by the mtime of ls -la)
is there any way of a "blacklist" of files that should not be watched?
apiVersion: skaffold/v1beta10
kind: Config
build:
artifacts:
- image: my-nodejs
sync:
manual:
- src: "**/*.ts"
dest: "."
- src: "**/*.tsx"
dest: "."
context: ./subfolder/
docker:
dockerfile: Dockerfile.dev
local: {}
deploy:
kubectl:
manifests:
- subfolder/k8s/**
Hey @RSWilli , thanks for submitting this! Skaffold will watch all dependencies in your Dockerfile, so if you have something like COPY . . in your Dockerfile then the .git directory will be watched.
Could you try adding a .dockerignore file to your workspace, and adding .git to it?
thanks for your response
yeah that worked like a charm, would have been nice to have something like this mentioned in the docs (maybe it is, but i didn't find it)
Most helpful comment
Hey @RSWilli , thanks for submitting this! Skaffold will watch all dependencies in your Dockerfile, so if you have something like
COPY . .in yourDockerfilethen the .git directory will be watched.Could you try adding a
.dockerignorefile to your workspace, and adding.gitto it?