简体   繁体   English

无法删除docker容器中的glassfish目录

[英]can't delete glassfish directory in docker container

Because of a known glassfish bug I tried to remove the glassfish/domains/domain1/generated folder. 由于一个已知的glassfish错误,我试图删除glassfish / domains / domain1 / generated文件夹。 We are running it in a docker container and it works well but somehow I can't delete these files. 我们正在docker容器中运行它,并且运行良好,但是以某种方式我无法删除这些文件。 rm -rf or rm -r generated/* works perfectly on my local installation. rm -rf或rm -r Generated / *在我的本地安装上完美运行。 Even when I copy a new glassfish4.1 into the container I cant delete the files. 即使将新的glassfish4.1复制到容器中,也无法删除文件。

Error message: 错误信息:

root@d032ccb9df70:/opt/glassfish4/glassfish/domains/domain1# rm -r generated/*
rm: cannot remove 'generated/ejb': Directory not empty
rm: cannot remove 'generated/jsp': Directory not empty
rm: cannot remove 'generated/policy': Directory not empty
rm: cannot remove 'generated/xml': Directory not empty

it seems like they are locked but I have no clue why. 似乎他们已被锁定,但我不知道为什么。 When I try to remove the whole glassfish, the path to the mentioned files stays untouched and the rest is removed. 当我尝试删除整个glassfish时,提到的文件的路径保持不变,其余的被删除。

似乎它是一个已知的docker-bug: https : //github.com/docker/docker/issues/1672

您可能想要查看lsof是否在容器中可用,然后获取一个特定文件并执行lsof <filename>来查看哪个进程(如果有)已锁定了那些进程。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM