abiosoft / abiosoft/colima

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

Đang mở
#844 7 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Go
Star
30.8k
Fork
613
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

### 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_

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.