docker-php-nginx-postgres-composer
docker-php-nginx-postgres-composer copied to clipboard
composer container does not know about extensions installed in php container
Hi as much as I like your layout, I suspect it can not work properly if some of the dependencies declared in the composer.json require php extensions.
I can install those php extensions in the php container, but the compose script is run by a php binary in the composer container which does not know about extensions installed in php container ...
Do you think this can be patched somehow ?
Yeah, you nailed it, something is wrong with the current layout.
You could run composer with the --ignore-platform-reqs to make it ignore the missing extensions on the composer image.
I'll be pushing soon a new version of the composer image will get ride of this issue.
This is what we do: https://github.com/simevo/spid-php-lib-example/blob/master/Dockerfile#L8-10 i.e. in the php container, we install the composer requirements and then pull the composer binary from a random place from the internet :tm:
I like to have my build tools on a separate container because when you go to production you don't want to have your build tools on it.