Skaffold: File sync Ignoring Files

Created on 15 May 2019  路  2Comments  路  Source: GoogleContainerTools/skaffold

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?

Information

  • Skaffold version: v0.29.0
  • Operating system: MacOS
  • Contents of skaffold.yaml:
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/**
aresync kinbug

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 your Dockerfile then the .git directory will be watched.

Could you try adding a .dockerignore file to your workspace, and adding .git to it?

All 2 comments

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)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

abatilo picture abatilo  路  4Comments

yurchenkosv picture yurchenkosv  路  3Comments

nathkn picture nathkn  路  3Comments

stanislav-zaprudskiy picture stanislav-zaprudskiy  路  4Comments

Morriz picture Morriz  路  3Comments