我刚刚开始使用Docker,但还没有习惯。我添加了https://github.com/markoshust/docker-magento
中的图片但是,当我尝试运行magento设置页面时,我看到了这些错误:
phpfpm_1 | - - 12/Jun/2018:18:49:04 +0000 "GET /setup/index.php/navigation" 403
phpfpm_1 | [12-Jun-2018 18:49:04] WARNING: [pool www] child 8 said into stderr: "NOTICE: Access to the script '/var/www/html/setup/index.php/navigation' has been denied (see security.limit_extensions)"
app_1 | 2018/06/12 18:49:04 [error] 7#7: *1 FastCGI sent in stderr: "Access to the script '/var/www/html/setup/index.php/navigation' has been denied (see security.limit_extensions)" while reading response header from upstream, client: 172.18.0.1, server: localhost, request: "GET /setup/index.php/navigation HTTP/1.1", upstream: "fastcgi://unix:/sock/docker.sock:", host: "magento2.test", referrer: "http://magento2.test/setup/"
在线搜索建议在www.conf中更改配置,但我不知道如何使用Docker,我尝试编辑图像的模板并删除容器并尝试再次创建容器但仍然遇到这些错误。我如何验证配置是否正确,如果我做错了如何正确更改配置文件?感谢
答案 0 :(得分:1)
您可以使用docker exec访问容器并执行任何操作。
示例:
docker container exec -it <container_id> bash
如果您仍无权更改文件夹或文件,请尝试使用-u root。
示例:
docker container exec -u root -it <container_id> bash
您也可以对容器文件夹执行绑定装载。
示例:
docker container run -v /host/folder:/container/folder <image>
这将映射所有内容并放在主机上以便于更新文件。