Scenario: Elastic Beanstalk Environment with Multi Docker platform. NGinx container and PHP7.1 Container PHP/Symfony application
Problem: I need to run Doctrine cli command after deploy to update database. I figured out how to do this dynamically but not automatically with following code.
docker exec $(docker ps | grep php-fpm | awk '{print $1}') php ./bin/console doctrine:schema:update --force
I deploy with CodePipeline/CodeBuild