abiosoft / abiosoft/colima

FIles are indentified as directories if the mounted volume is not in the mounts section of the Colima config

Offen
#844 7 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Go
Sterne
30.8k
Forks
613
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

### Description

If a container is started with a volume mount that is not included in the mounts section of `colima.yaml`, then any files in that directory is identified as a directory.

### Version

Colima Version: 0.5.6
Lima Version: 0.18.0
Qemu Version: 8.1.2

### Operating System

- [ ] macOS Intel <= 12 (Monterrey)
- [ ] macOS Intel >= 13 (Ventura)
- [ ] macOS M1 <= 12 (Monterrey)
- [X] macOS M1 >= 13 (Ventura)
- [ ] Linux

### Output of `colima status`

INFO[0000] colima is running using macOS Virtualization.Framework
INFO[0000] arch: aarch64
INFO[0000] runtime: docker
INFO[0000] mountType: virtiofs
INFO[0000] socket: unix:///Users/nicksmith/.colima/default/docker.s

### Reproduction Steps

```
➜ docker run -ti --rm -v ~/Documents/mydir:/x ubuntu /bin/sh
# cd /x
# ls
total 8
drwxr-xr-x 5 root root 120 Nov 7 09:03 .
drwxr-xr-x 1 root root 4096 Nov 7 09:05 ..
drwxr-xr-x 2 root root 40 Nov 7 08:59 miocm-config.yml
```
Note that the `miocm-config.yml` file has been mounted as a directory.

If I now add that directory into the mount section of my `colima.yaml` file, the files are files.
```
mounts:
- location: /Users/me/Documents/mydir
writable: true
```
```
➜ docker run -ti --rm -v ~/Documents/mydir:/x ubuntu /bin/sh
# cd /x
# ls
total 8
drwxr-xr-x 5 root root 120 Nov 7 09:03 .
drwxr-xr-x 1 root root 4096 Nov 7 09:05 ..
-rwxrwxrwx 1 root root 135 Nov 6 17:17 miocm-config.yml
```

### Expected behaviour

An error should be throw and the container fail.

### Additional context

_No response_

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.