1

I try to build Magento 2.4.5 with php 8.1 docker on premises environment and I followed the process described here https://devdocs.magento.com/cloud/docker/docker-installation.html.

I ended up with error:

Cannot decode string: list indices must be integers or slices, not str ERROR: 1

Below are the exact steps I followed with the exact commands:

  1. Created project using composer

    composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition=2.4.5 magento-community-edition

  2. Change to directory magento-community-edition

  3. Add the ece-tools and Cloud Docker for Commerce packages.

    composer require --no-update --dev magento/ece-tools magento/magento-cloud-docker

  4. Install ece tools and cloud docker with composer

    compose update

  5. I ran the Docker configuration generator and created docker-compose.yml

    ./vendor/bin/ece-docker build:compose --mode=production --php=8.1 --db=10.3

  6. Created and started containers

    ./bin/magento-docker up

  7. Run build hooks

    ./bin/magento-docker ece-build

At this step after it run installing various composer dependencies if fails with error:

Running "build" hook. Cannot decode string: list indices must be integers or slices, not str ERROR: 1

Any assistance is appreciated.

2
  • Hi! Did you create the .magento.app.yaml file? Also, you can try to use the template for 2.4.5: github.com/magento/magento-cloud/tree/2.4.5 Templates contain all needed config files.
    – BaDos
    Nov 1, 2022 at 23:20
  • Thanks for the response. I added the .magento.app.yaml file but still same problem. I cannot use above repository because I try the community edition. Nov 8, 2022 at 6:02

1 Answer 1

0

try these steps:

  • clone needed branch from https://github.com/magento/magento-cloud
  • run composer install
  • run ./vendor/bin/ece-docker build:compose
  • run docker-compose up -d
  • run docker-compose run build cloud-build
  • run docker-compose run deploy cloud-deploy
  • run docker-compose run deploy cloud-post-deploy

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.