我正在使用https://hub.docker.com/r/testcafe/testcafe/
来运行我们的Testcafe项目,它可以正常工作,除了在失败时无法创建屏幕截图目录,原因如下:
Error: EACCES: permission denied, mkdir '/screenshots'有没有可能做到这一点,我是否遗漏了什么?
我试过了:
--screenshots ./screenshots 和:
--screenshots {full path to directory}/screenshots如何授予对此docker容器的访问权限,以便写入主机上的目录以供将来参考?
发布于 2019-03-21 22:06:13
最简单的解决方案是在您的Docker主机上创建一个screenshots目录,配置正确的权限,并将该目录作为卷传递给容器。您可以使用以下命令作为参考:
mkdir screenshots
chmod a=rwx screenshots
docker run -it --rm -v ./tests:/tests -v ./screenshots:/screenshots testcafe/testcafe firefox /tests --screenshots /screenshotshttps://stackoverflow.com/questions/55260795
复制相似问题