Yii 2 初学者工具包 docker - composer create project - 您的要求无法解析为可安装集.. 当遵循文档时

Yii 2 starter kit docker - composer create project - Your requirements could not be resolved to an installable set .. when following the docs

问题是,在 Docker 中通过 composer create-project 命令创建 Yii 2 初学者工具包项目时,尽管完全遵循了文档

https://github.com/yii2-starter-kit/yii2-starter-kit/blob/master/docs/installation.md#get-source-code-via-composer

composer create-project yii2-starter-kit/yii2-starter-kit myproject.com

它导致错误

  Problem 1
    - The requested PHP extension ext-intl * is missing from your system. Install or enable PHP's intl extension.
  Problem 2
    - Installation request for league/uri 5.3.0 -> satisfiable by league/uri[5.3.0].
    - league/uri 5.3.0 requires ext-intl * -> the requested PHP extension intl is missing from your system.
  Problem 3
    - Installation request for league/uri-components 1.8.2 -> satisfiable by league/uri-components[1.8.2].
    - league/uri-components 1.8.2 requires ext-intl * -> the requested PHP extension intl is missing from your system.
  Problem 4
    - Installation request for league/uri-hostname-parser 1.1.1 -> satisfiable by league/uri-hostname-parser[1.1.1].
    - league/uri-hostname-parser 1.1.1 requires ext-intl * -> the requested PHP extension intl is missing from your system.
  Problem 5
    - Installation request for league/uri-manipulations 1.5.0 -> satisfiable by league/uri-manipulations[1.5.0].
    - league/uri-manipulations 1.5.0 requires ext-intl * -> the requested PHP extension intl is missing from your system.
  Problem 6
    - league/uri 5.3.0 requires ext-intl * -> the requested PHP extension intl is missing from your system.
    - trntv/yii2-glide 1.2.2 requires league/uri ^5.0 -> satisfiable by league/uri[5.3.0].
    - Installation request for trntv/yii2-glide 1.2.2 -> satisfiable by trntv/yii2-glide[1.2.2].

  To enable extensions, verify that they are enabled in your .ini files:
    - C:\xampp\php\php.ini

使用 composer create-project 命令被列为创建项目的可用选项之一

https://github.com/yii2-starter-kit/yii2-starter-kit/blob/master/docs/installation.md#get-source-code-via-composer

,但是,在 docker 中使用它不需要在主机系统上拥有所有依赖项的更好方法是通过 git

检索文件

git clone https://github.com/yii2-starter-kit/yii2-starter-kit.git 删除项目 git 日志的 .git 文件夹,或忽略初始错误

之后使用内部使用内部 docker composer command/environment

的以下命令安装项目依赖项
composer run-script docker:build

因为该环境是专门预先准备好的,可以包含所有此类依赖库并完全防止此类错误