我在docker中运行了一个以编程方式创建文件的应用程序。大多数时间文件都是正确创建的,然后被删除。有时会创建具有未知权限的文件
drwxrwxrwx 0 root root 4096 Apr 17 21:41 ..
-????????? ? ? ? ? ? __CG__NarwhalLayoutDomainEntitiesTheme.php
-rwxrwxrwx 1 root root 8314 Apr 19 12:46 __CG__NarwhalLayoutDomainEntitiesTheme.php.5ad802fc34f6b0.60147712
当发生这种情况但我尝试删除时可以在Windows资源管理器中看到该文件时出现此错误:
"You need permission to perform this action"
"You require permission from the computer's administrator to make changes to this file"
我甚至以管理员身份尝试过,但是当我尝试从容器shell中删除文件时,它仍然无效。我收到这个错误:
rm:无法删除'__CG__NarwhalLayoutDomainEntitiesTheme.php':没有这样的文件或目录
当我重新启动docker但是我不想每隔几分钟重启docker时,这个问题就消失了。
答案 0 :(得分:0)
Looks like this is an ongoing problem with docker for windows. I found a temporary solution here https://github.com/docker/for-win/issues/525
I fixed the problem by simply pointing my doctrine proxies to a folder inside the container such as /tmp and is not mounted.