GoogleContainerTools / GoogleContainerTools/skaffold

COPY . . not copying all files if Dockerfile is under Windows junction

Open
#7,322 1 comment 0 reactions 0 assignees View on GitHub
kind/bug platform/windows priority/p3
Dominant language
Go
Stars
15.9k
Forks
1.7k
Avg merge
3d 9h
Merged PRs (30d)
10

Description

### Expected behavior

Running `skaffold build` should copy the same files as `docker build` when executing a `COPY . .` command in the Dockerfile, also when the Dockerfile is referenced via a Windows junction directory.

### Actual behavior

Only a (deterministic) subset of the files are copied.

### Information

- Skaffold version: 1.35.2
- Operating system: Windows 11, 10.0.22000 Build 22000
- Installed via: Chocolatey
- Contents of skaffold.yaml:

```yaml
apiVersion: skaffold/v2beta23
kind: Config
metadata:
name: root
build:
local:
push: false
tryImportMissing: true
tagPolicy:
inputDigest: { }
artifacts:
- image: myregisry/myrootname/myprojectname
context: ../../../MyDirectory
docker:
dockerfile: Dockerfile
```
Note: **MyDirectory** is a Windows junction pointing to another directory:
```
ls -l
lrwxrwxrwx 1 MyUser 4096 21 Apr 19 10:16 MyDirectory -> ../myroot/MyDirectory/
```

- Contents of Dockerfile:
```
...
RUN ls -la
COPY . .
RUN ls -la
...
```

- Contents of **MyDirectory**: Various files, like angular.json, tsconfig.json, etc.

### Steps to reproduce the behavior

1. `skaffold build`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.