从 docker 容器 (Windows 10) 中的挂载文件更改文件权限

Changing file permissions from a mounted file from inside the docker container (Windows 10)

是否可以从 docker 容器中更改挂载文件的文件权限? 如果是,我该怎么做? 如果我用 chmod 尝试它,什么也不会发生。 我在 windows 10.

上使用 Debian 容器

这是我试过的照片。

感谢您的帮助。 :)

根据 here.

中的文档,这似乎是不可能的

When sharing files from Windows, Docker Desktop sets permissions on shared volumes to a default value of 0777 (read, write, execute permissions for user and for group).

The default permissions on shared volumes are not configurable. If you are working with applications that require permissions different from the shared volume defaults at container runtime, you need to either use non-host-mounted volumes or find a way to make the applications work with the default file permissions.

已在

上回答此问题