Closed
Description
For a multi step build, it would be helpful to have an environment variable for the extension folder.
Something like
ENV PHP_EXT_DIR /usr/local/lib/php/extensions/no-debug-non-zts-20190902
This would make it much easy to build extensions in one step and copy the builded extensions to the final image.
This safes build time, because all cleanup commands can be omitted.
For now I use a build arg with a matrix in my Dockerfile/GitHub Workflow.
https://github.com/t3easy/docker-php/blob/main/Dockerfile#L2
https://github.com/t3easy/docker-php/blob/main/Dockerfile#L110-L119
https://github.com/t3easy/docker-php/blob/main/.github/workflows/ci.yml#L16