scandipwa / magento-docker

Docker environment dedicated for ScandiPWA theme development
https://scandipwa.com/
Open Software License 3.0
105 stars 315 forks source link

The Magento not getting installed #119

Open vy-shmal opened 3 years ago

vy-shmal commented 3 years ago

When I press dc up -d --remove-orphans it finises but fails at installing Magneto 2 In applogs it shows the process it takes to finish and as I see it fails on the composer install. With the problem Your lock file does not contain a compatible set of packages. Please run composer update.

app_1            | Verifying lock file contents can be installed on current platform.
app_1            | Dependency resolution completed in 0.000 seconds
app_1            | Your lock file does not contain a compatible set of packages. Please run composer update.
app_1            | 
app_1            |   Problem 1
app_1            |     - laminas/laminas-dependency-plugin is locked to version 1.0.4 and an update of this package was not requested.
app_1            |     - laminas/laminas-dependency-plugin 1.0.4 requires composer-plugin-api ^1.1 -> found composer-plugin-api[2.0.0] but it does not match the constraint.
app_1            |   Problem 2
app_1            |     - magento/composer-root-update-plugin is locked to version 1.0.0 and an update of this package was not requested.
app_1            |     - magento/composer-root-update-plugin 1.0.0 requires composer-plugin-api ^1.0 -> found composer-plugin-api[2.0.0] but it does not match the constraint.
app_1            |   Problem 3
app_1            |     - magento/inventory-composer-installer is locked to version 1.1.0 and an update of this package was not requested.
app_1            |     - magento/inventory-composer-installer 1.1.0 requires composer-plugin-api ^1.1 -> found composer-plugin-api[2.0.0] but it does not match the constraint.
app_1            |   Problem 4
app_1            |     - magento/magento-composer-installer is locked to version 0.1.13 and an update of this package was not requested.
app_1            |     - magento/magento-composer-installer 0.1.13 requires composer-plugin-api ^1.0 -> found composer-plugin-api[2.0.0] but it does not match the constraint.
app_1            |   Problem 5
app_1            |     - magento/magento-composer-installer 0.1.13 requires composer-plugin-api ^1.0 -> found composer-plugin-api[2.0.0] but it does not match the constraint.
app_1            |     - magento/product-community-edition 2.4.1 requires magento/magento-composer-installer >=0.1.11 -> satisfiable by magento/magento-composer-installer[0.1.13].
app_1            |     - magento/product-community-edition is locked to version 2.4.1 and an update of this package was not requested.
app_1            | 
app_1            | You are using Composer 2, which some of your plugins seem to be incompatible with. Make sure you update your plugins or report a plugin-issue to ask them to support Composer 2.
app_1            | Flushing Magento config cache
app_1            | wait-for-it.sh: waiting 5 seconds for redis:6379
app_1            | wait-for-it.sh: redis:6379 is available after 0 seconds
app_1            | /wait-for-it.sh: line 174: exec: redis-cli: not found
app_1            | Setting magento database credentials
app_1            | /start.sh: line 123: magento: command not found
app_1            | Setting redis for persisted query(PWA)
app_1            | /start.sh: line 133: bin/magento: No such file or directory
app_1            | Setting location for Varnish cache flushing
app_1            | /start.sh: line 234: bin/magento: No such file or directory
app_1            | Checking status of the magento database
app_1            | /start.sh: line 162: magento: command not found
app_1            | 
app_1            | /start.sh: line 179: magento: command not found
app_1            | DB STATUS: 127 
app_1            | Database migration failed: manual action is required!
app_1            | Setting redis as config cache
app_1            | /start.sh: line 205: bin/magento: No such file or directory
app_1            | Setting redis as session storage
app_1            | /start.sh: line 213: bin/magento: No such file or directory
app_1            | Setting Elasticsearch7 as a search engine
app_1            | /start.sh: line 224: magento: command not found
app_1            | Setting elasticsearch as a host name for Elasticsearch5
app_1            | /start.sh: line 228: magento: command not found
app_1            | /start.sh: line 229: magento: command not found
app_1            | Setting Varnish config for Magento
app_1            | /start.sh: line 239: magento: command not found
app_1            | /start.sh: line 240: magento: command not found
app_1            | /start.sh: line 241: magento: command not found
app_1            | /start.sh: line 242: magento: command not found
app_1            | Checking user admin 
app_1            | /start.sh: line 143: magento: command not found
app_1            | Switching magento mode
app_1            | /start.sh: line 249: bin/magento: No such file or directory
app_1            | Register PWA theme in Magento
app_1            | /start.sh: line 68: magento: command not found
app_1            | /start.sh: line 69: magento: command not found
app_1            | Setting baseurl to http://scandipwa.local
app_1            | /start.sh: line 264: magento: command not found
app_1            | Setting secure baseurl to https://scandipwa.local
app_1            | /start.sh: line 268: magento: command not found
app_1            | /start.sh: line 269: magento: command not found
app_1            | /start.sh: line 270: magento: command not found
app_1            | Applying correct permissions to internal folders
app_1            | chmod: cannot access 'var': No such file or directory
app_1            | chmod: cannot access 'vendor': No such file or directory
app_1            | chmod: cannot access 'generated': No such file or directory
app_1            | chmod: cannot access 'pub/static': No such file or directory
app_1            | chmod: cannot access 'pub/media': No such file or directory
app_1            | chmod: cannot access 'app/etc': No such file or directory
app_1            | Flushing caches
app_1            | /start.sh: line 276: magento: command not found
app_1            | Disabling maintenance mode
app_1            | /start.sh: line 278: magento: command not found
app_1            | /start.sh: line 279: magento: command not found
app_1            | Applying correct permissions to internal folders
app_1            | chmod: cannot access 'var': No such file or directory
app_1            | chmod: cannot access 'vendor': No such file or directory
app_1            | chmod: cannot access 'generated': No such file or directory
app_1            | chmod: cannot access 'pub/static': No such file or directory
app_1            | chmod: cannot access 'pub/media': No such file or directory
app_1            | chmod: cannot access 'app/etc': No such file or directory
app_1            | /start.sh: line 288: magento: command not found
app_1            | 
app_1            |                                         
app_1            |   Magento folder could not be detected  
app_1            |                                         
app_1            | 
app_1            | dev:theme:list [--format [FORMAT]] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [--root-dir [ROOT-DIR]] [--skip-config] [--skip-root-check] [--skip-core-commands [SKIP-CORE-COMMANDS]] [--skip-magento-compatibility-check] [--] <command>
app_1            | 
app_1            | Deployment executed in .534250278 seconds
app_1            | Staring php fpm, ready to rock
app_1            | [03-Dec-2020 12:00:55] NOTICE: [pool www] 'user' directive is ignored when FPM is not running as root
app_1            | [03-Dec-2020 12:00:55] NOTICE: [pool www] 'user' directive is ignored when FPM is not running as root
app_1            | [03-Dec-2020 12:00:55] NOTICE: [pool www] 'group' directive is ignored when FPM is not running as root
app_1            | [03-Dec-2020 12:00:55] NOTICE: [pool www] 'group' directive is ignored when FPM is not running as root
app_1            | [03-Dec-2020 12:00:55] NOTICE: fpm is running, pid 135
app_1            | [03-Dec-2020 12:00:55] NOTICE: ready to handle connections

To Reproduce Steps to reproduce the behavior:

  1. git clone git@github.com:scandipwa/magento-docker.git
  2. dcf pull
  3. dc up -d --remove-orphans
  4. applogs

Expected behavior The Magento installation completes

Screenshots Screenshot from 2020-12-03 14-03-08

Desktop (please complete the following information):

vy-shmal commented 3 years ago

As I debugged a little bit, the problem is that the docker container scandipwa/base:magento-2.4.1 uses Composer 2.0 and the packages magento/composer-root-update-plugin and laminas/laminas-dependency-plugin[1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4] require composer-plugin-api ^1.1 (composer v1).

I don't know how to commit the new docker image if I make changes to it so I could help. I changed the composer version of the docker app container and the composer install worked but its not a solution because it recreates the container again later.

docker-compose -f docker-compose.yml -f docker-compose.local.yml -f docker-compose.ssl.yml -f docker-compose.frontend.yml exec -u root app bash

composer self-update 1.10.19

For now I used the oldest ``branch scandipwa/magento-docker 2.4.0``` which works out of the box.