gpt4 book ai didi

docker - 从Windows到Linux容器的Docker-Compose Volume挂载使一切都可执行

转载 作者:行者123 更新时间:2023-12-02 20:12:47 24 4
gpt4 key购买 nike

我正在处理一些我们在Docker容器中设置的Ansible东西。从linux系统运行时,效果很好。从Windows系统运行时,出现以下错误:

ERROR! Problem running vault password script /etc/ansible-deployment/secrets/vault-dev.txt ([Errno 8] Exec format error). If this is not a script, remove the executable bit from the file.

基本上,这就是将文件标记为可执行文件。我注意到的(并且到目前为止还没有成为一个大问题)是,所有从Windows挂载到linux容器的文件都始终标有可执行属性。

有什么办法可以控制/预防这种情况?

最佳答案

您是否尝试在已安装路径的末尾添加:ro

像这样:

HOST:CONTAINER:ro

关于docker - 从Windows到Linux容器的Docker-Compose Volume挂载使一切都可执行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45723711/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com