1 - Need start the project.
bash <project-root>/vendor/magento/magento-cloud-docker/bin/init-docker.sh
https://devdocs.magento.com/cloud/docker/docker-development.html
2 - Build the compose
./vendor/bin/ece-docker build:compose --mode="developer"
https://devdocs.magento.com/cloud/docker/docker-launch.html
3 - Run the dokcer-compose
docker-compose up -d
4 - Check the services access it's right here: (Magento root folder)
vi .magento.env.yaml
More commands here: https://devdocs.magento.com/cloud/docker/docker-quick-reference.html
To access the php container use:
docker-compose run --rm deploy bash
Need change the dockerfile (fpm and cli) to include this lines.
RUN cd /tmp
&& curl -O http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
&& tar zxvf ioncube_loaders_lin_x86-64.tar.gz
&& export PHP_CONFD=$(php-config --configure-options|sed 's/.\with-config-file-scan-dir=(\S).*/\1/g')
&& export PHP_VERSION=$(php -r "echo PHP_MAJOR_VERSION.'.'.PHP_MINOR_VERSION;")
&& export PHP_EXT_DIR=$(php-config --extension-dir)
&& cp "ioncube/ioncube_loader_lin_${PHP_VERSION}.so" "${PHP_EXT_DIR}/ioncube.so"
&& rm -rf ./ioncube
&& rm ioncube_loaders_lin_x86-64.tar.gz
On command RUN docker-php-ext-enable add
ioncube
- Change the docker-compose to use that images.
# image: 'magento/magento-cloud-docker-php:7.4-fpm-1.2.2'
build:
context: ./vendor/magento/magento-cloud-docker/images/php/7.4-fpm/
# image: 'magento/magento-cloud-docker-php:7.4-cli-1.2.2'
build:
context: ./vendor/magento/magento-cloud-docker/images/php/7.4-cli/
- You will need build the compose again.
@credits /texboy