docker-php-nginx-postgres-composer icon indicating copy to clipboard operation
docker-php-nginx-postgres-composer copied to clipboard

composer container does not know about extensions installed in php container

Open simevo opened this issue 7 years ago • 3 comments
trafficstars

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 ?

simevo avatar Oct 18 '18 16:10 simevo

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.

devantoine avatar Oct 19 '18 10:10 devantoine

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:

simevo avatar Oct 19 '18 11:10 simevo

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.

devantoine avatar Oct 19 '18 14:10 devantoine