docker - Ubuntu,shopsys 通过 Composer , docker 安装,仍然崩溃

标签 docker ubuntu composer-php

按照建议,我想通过 composer 和 docker 安装 shopsys。

https://github.com/shopsys/shopsys/blob/master/docs/installation/installation-using-docker-linux.md

我安装了 git、php-fpm(已配置)、postgres(已配置)、composer、docker、docker-compose。

sudo apt install git
sudo apt install php7.2-fpm
sudo apt install postgresql
sudo apt install composer
sudo apt install docker-ce
sudo apt install docker-compose

一切还好。

我将我的用户添加到 docker 组。
sudo usermod -a -G docker $(whoami)

好的。

接下来我制作了文件夹/var/www/html/shopsys ,通过composer创建了项目shopsys。
composer create-project shopsys/project-base --no-install --keep-vcs
cd project-base/

然后我在 中运行它/var/www/html/shopsys/project-base .
./scripts/install.sh

一切似乎都很好,直到这个。
[RuntimeException]                                             
/var/www/html/vendor does not exist and could not be created.

我将文件夹 的权限设置为 777/var/www/html ,然后再次运行它,但同样的问题。

我运行这个。
sudo composer install

它向我显示了这个错误。
....Exception\InvalidConfigurationException]
Invalid configuration for path "monolog.handlers.main": You can only use ex    
cluded_http_codes/excluded_404s with a FingersCrossedHandler definition

In ScriptHandler.php line 294:

An error occurred when executing the "'shopsys:domains-urls:configure'" command:
In BaseNode.php line 319:

...\Exception\InvalidConfigurationException]
Invalid configuration for path "monolog.handlers.main": You can only use ex                                                                                                                                     
cluded_http_codes/excluded_404s with a FingersCrossedHandler definition
...

等等,错误非常难看。

运行脚本时的最后一个错误 安装.sh .
file_put_contents(/var/www/html/vendor/composer/installed.json): failed to open stream: Permission denied

但是这个文件夹不存在。
ls: cannot access '/var/www/html/vendor/': No such file or directory

只是问,问题可能出在哪里?

是否可以通过简单的方式从某个链接下载源代码、提取、配置和显示在 Web 浏览器中,例如 wordpress?

谢谢。

最佳答案

要解决供应商的问题:

您的 UID 和 GID 似乎与默认的 1000 不同,默认情况下在 Linux 的 docker-compose.yml 中设置。

要解决您的问题,您可以继续执行 https://github.com/shopsys/shopsys/blob/master/docs/installation/installation-using-docker-linux.md#3-set-the-uid-and-gid-to-allow-file-access-in-mounted-volumes 中的第 3 步。

您发现安装脚本有问题,我创建了 issue on GitHub .

要解决路径“monolog.handlers.main”的无效配置问题:

目前 symfony/monolog-bundle 的新次要版本 (3.4.0) 存在问题这创造了BC休息。已经创建了issue关于这个问题,已经合并了fix在 Shopsys 大师中。

要解决项目中的问题,您必须添加"symfony/monolog-bundle": ">=3.4.0",conflict您的 composer.json 中的部分文件,然后运行 ​​composer install再次。

我们正在尝试尽快回答有关 stackoverflow 的问题,但我们也有 Slack哪里有很多用户,您可能会更快地回答您的问题。

关于docker - Ubuntu,shopsys 通过 Composer , docker 安装,仍然崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56702148/

相关文章:

installation - Laravel composer 安装卡在 "Installing dependencies"并消耗大量资源(CPU、DISK)

php - 配置错误

docker - 如何在 docker 容器内将 DNS 名称别名为 hosts.docker.internal?

java - Wildfly Java 应用程序的 Dockerfile

python - ArangoDB 读取超时(读取超时=60)

docker - 如何在Centos的生产环境中运行docker容器?

networking - 通过 VirtualBox 上的 guest 访问主机操作系统上的网络服务器

Ubuntu CLI 批量查找 CP

internet-explorer - 如何在 Ubuntu 中安装 Internet Explorer?

laravel - Composer 更新未安装整个 Laravel 应用程序