I need to run docker-compose with two containers,- php-fpm and php-cli. Although I need another container with composer.
When I run docker-compose up -d - container with php-cli become always restarting and composer container just stops.
PHP cli is not running in daemon mode. You run it, and then it stops. Next, Docker tries to restart it (you've set restart: always
policy for php-cli
). :)
IMO php-cli
and composer
services are redundant. You can use php
service for your needs. Simply run docker-compose run php php [path to script]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With