Skip to content

docker compose でエラーが発生します #7

@ksakai100

Description

@ksakai100

docker compose を実行すると以下のエラーが発生します。

$ docker compose -f docker-compose.yml up
[+] Building 3.6s (13/16)                                        docker:default
 => [php internal] load build definition from Dockerfile                   0.0s
 => => transferring dockerfile: 1.35kB                                     0.0s
 => [php internal] load .dockerignore                                      0.0s
 => => transferring context: 2B                                            0.0s
 => [php internal] load metadata for docker.io/library/php:8.1-fpm         1.0s
 => [php  1/13] FROM docker.io/library/php:8.1-fpm@sha256:814e72a13758102  0.0s
 => CACHED [php  2/13] RUN apt-get update && apt-get install -y git wget   0.0s
 => CACHED [php  3/13] RUN apt-get install -y default-mysql-client && doc  0.0s
 => CACHED [php  4/13] RUN curl -sS https://getcomposer.org/installer | p  0.0s
 => CACHED [php  5/13] RUN mkdir /var/www/exment                           0.0s
 => CACHED [php  6/13] WORKDIR /var/www/exment                             0.0s
 => CACHED [php  7/13] RUN COMPOSER_MEMORY_LIMIT=-1 composer create-proje  0.0s
 => CACHED [php  8/13] RUN composer config --no-plugins allow-plugins.kyl  0.0s
 => CACHED [php  9/13] RUN composer require psr/simple-cache=^2.0          0.0s
 => ERROR [php 10/13] RUN COMPOSER_MEMORY_LIMIT=-1 composer require excee  2.5s
------
 > [php 10/13] RUN COMPOSER_MEMORY_LIMIT=-1 composer require exceedone/exment=~5.0:
0.503 ./composer.json has been updated
0.543 Running composer update exceedone/exment
0.556 Loading composer repositories with package information
2.300 Updating dependencies
2.417 Your requirements could not be resolved to an installable set of packages.
2.417
2.417   Problem 1
2.417     - doctrine/common[v2.4.0, ..., v2.5.3] require doctrine/inflector 1.* -> found doctrine/inflector[v1.0, ..., 1.4.4] but the package is fixed to 2.0.8 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
2.417     - doctrine/common[v2.6.0, ..., v2.6.2] require php ~5.5|~7.0 -> your php version (8.1.26) does not satisfy that requirement.
2.417     - doctrine/common[v2.7.0, ..., v2.7.3] require php ~5.6|~7.0 -> your php version (8.1.26) does not satisfy that requirement.
2.417     - doctrine/common[v2.8.0, ..., v2.8.1] require php ~7.1 -> your php version (8.1.26) does not satisfy that requirement.
2.417     - doctrine/common[v2.9.0, ..., 2.13.0] require php ^7.1 -> your php version (8.1.26) does not satisfy that requirement.
2.417     - doctrine/dbal[v2.6.0, ..., v2.9.3] require php ^7.1 -> your php version (8.1.26) does not satisfy that requirement.
2.417     - doctrine/common[2.13.1, ..., 2.13.3] require doctrine/inflector ^1.0 -> found doctrine/inflector[v1.0, ..., 1.4.4] but the package is fixed to 2.0.8 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
2.417     - doctrine/dbal[v2.10.0, ..., 2.10.4] require php ^7.2 -> your php version (8.1.26) does not satisfy that requirement.
2.417     - doctrine/dbal[2.11.0, ..., 2.11.3] require php ^7.3 -> your php version (8.1.26) does not satisfy that requirement.
2.417     - exceedone/exment[v5.0.3, ..., v5.0.11] require exceedone/laravel-admin ^3.0.1 -> satisfiable by exceedone/laravel-admin[v3.0.1, v3.0.2, v3.0.3].
2.417     - exceedone/exment[v5.0.0, ..., v5.0.2] require exceedone/laravel-admin ^3.0 -> satisfiable by exceedone/laravel-admin[v3.0.0, v3.0.1, v3.0.2, v3.0.3].
2.417     - exceedone/laravel-admin[v3.0.0, ..., v3.0.3] require doctrine/dbal 2.* -> satisfiable by doctrine/dbal[2.1.5, ..., 2.13.9].
2.417     - carbonphp/carbon-doctrine-types 3.1.0 conflicts with doctrine/dbal 2.13.9.
2.417     - carbonphp/carbon-doctrine-types 3.1.0 conflicts with doctrine/dbal 2.13.8.
2.417     - carbonphp/carbon-doctrine-types 3.1.0 conflicts with doctrine/dbal 2.13.1.
2.417     - carbonphp/carbon-doctrine-types 3.1.0 conflicts with doctrine/dbal 2.12.1.
2.417     - carbonphp/carbon-doctrine-types 3.1.0 conflicts with doctrine/dbal 2.3.5.
2.417     - carbonphp/carbon-doctrine-types 3.1.0 conflicts with doctrine/dbal 2.3.2.
2.417     - carbonphp/carbon-doctrine-types 3.1.0 conflicts with doctrine/dbal 2.2.2.
2.417     - carbonphp/carbon-doctrine-types 3.1.0 conflicts with doctrine/dbal 2.1.7.
2.417     - nesbot/carbon 2.72.1 requires carbonphp/carbon-doctrine-types * -> satisfiable by carbonphp/carbon-doctrine-types[3.1.0].
2.417     - laravel/framework v9.52.16 requires nesbot/carbon ^2.62.1 -> satisfiable by nesbot/carbon[2.72.1].
2.417     - doctrine/dbal[v2.5.0, ..., v2.5.2] require doctrine/common >=2.4,<2.6-dev -> satisfiable by doctrine/common[v2.4.0, ..., v2.5.3].
2.417     - doctrine/dbal[v2.5.3, ..., v2.5.5] require doctrine/common >=2.4,<2.7-dev -> satisfiable by doctrine/common[v2.4.0, ..., v2.6.2].
2.417     - doctrine/dbal[v2.5.6, ..., v2.5.13] require doctrine/common >=2.4,<2.8-dev -> satisfiable by doctrine/common[v2.4.0, ..., v2.7.3].
2.417     - doctrine/dbal[v2.4.0, ..., v2.4.5] require doctrine/common ~2.4 -> satisfiable by doctrine/common[v2.4.0, ..., 2.13.3].
2.417     - laravel/framework is locked to version v9.52.16 and an update of this package was not requested.
2.417     - Root composer.json requires exceedone/exment ~5.0 -> satisfiable by exceedone/exment[v5.0.0, ..., v5.0.11].
2.417
2.417 Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
2.420
2.420 Installation failed, reverting ./composer.json and ./composer.lock to their original content.
------
failed to solve: process "/bin/sh -c COMPOSER_MEMORY_LIMIT=-1 composer require exceedone/exment=${EXMENT_VERSION}" did not complete successfully: exit code: 2

原因は carbonphp/carbon-doctrine-types の最新版が doctrine/dbal の古いバージョンを conflicts に指定していることにあります。
https://packagist.org/packages/carbonphp/carbon-doctrine-types

とりあえずの対処としては Dockerfile に以下を追加して carbonphp/carbon-doctrine-types のバージョンを固定する必要がありそうです。

RUN composer require carbonphp/carbon-doctrine-types=1.0.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions