Skip to content

Environment variable for extension dir #1115

Closed
@t3easy

Description

@t3easy

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    RequestRequest for image modification or feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions