- Create an ini file, disabling exec function
In vendor/magento/magento-cloud-docker/images/php/cli/etc/
create php-disable-functions.ini
and add the following:
disable_functions=exec
- Add ini file to Dockerfiles
In vendor/magento/magento-cloud-docker/images/php/cli/Dockerfile
add the following line around line 190.
ADD etc/php-disable-functions.ini /usr/local/etc/php/conf.d/zz-disable-functions.ini
- Generate PHP configuration
This command can be run in docker or docker-compose depending on if the containers are running.
docker-compose run deploy vendor/bin/ece-docker image:generate:php
docker run -it -v $(pwd):/app/ -v ~/.composer/:/root/.composer/ magento/magento-cloud-docker-php:7.3-cli-1.1 bash -c "./vendor/bin/ece-docker image:generate:php"
-
Add override in docker-compose
services: deploy: build: context: ./vendor/magento/magento-cloud-docker/images/php/7.3-cli
-
Rebuild containers
docker-compose up -d --build
-
Check to see changes
docker-compose run deploy php -i | grep disable_functions
Results should looks like:
Starting magento-ce_redis_1 ... done
Starting magento-ce_elasticsearch_1 ... done
Starting magento-ce_db_1 ... done
disable_functions => exec => exec
-
Revert those changes, if you don't things will be broken
docker-compose pull
This command will overwrite the image that was built in step #5.