abiosoft / abiosoft/colima

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

未关闭
#844 7 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Go
星标
30.8k
派生
613
PR 合并指标
30 天内没有已合并 PR

描述

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

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。