GoogleContainerTools / GoogleContainerTools/skaffold
Dockerfile file analysis should support Buildkit's `RUN --mount`
- Dominant language
- Go
- Stars
- 15.9k
- Forks
- 1.7k
- Avg merge
- 3d 9h
- Merged PRs (30d)
- 10
Description
_(From the [`#skaffold` Slack channel](https://kubernetes.slack.com/archives/CABQMSZA6/p1624662175123800))_
Buildkit supports [`run --mount=type=bind,source=xxx,target=yyy`](https://github.com/moby/buildkit/blob/master/frontend/dockerfile/docs/syntax.md#run---mounttypebind-the-default-mount-type) which behaves similar to a `COPY xxx yyy`. The `type=bind` can be omitted as this is the default mount type.
The doc does say that this is only valid with [dockerfile syntax 1.2 or above](https://github.com/moby/buildkit/blob/master/frontend/dockerfile/docs/syntax.md#build-mounts-run---mount):
> To use this flag set Dockerfile version to at least 1.2
>
> `# syntax=docker/dockerfile:1.2`
### Expected behavior
Skaffold would detect changes to the source in `xxx` and trigger a rebuild.
### Actual behavior
[Skaffold doesn't detect the source changes.](https://kubernetes.slack.com/archives/CABQMSZA6/p1624662175123800)

### Information
- Skaffold version: unspecified
### Workaround
Insert manual `COPY` statements.
Contributor guide
Assessment
This issue has not been assessed yet.