Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using pecl is hard from the Alpine variant #919

Open
TimWolla opened this issue Dec 5, 2019 · 6 comments
Open

Using pecl is hard from the Alpine variant #919

TimWolla opened this issue Dec 5, 2019 · 6 comments
Labels
Request Request for image modification or feature

Comments

@TimWolla
Copy link
Contributor

TimWolla commented Dec 5, 2019

Partly a duplicate of #412 and related to #769.

The adminer image has alpine based variants, because it is a mostly batteries included image for development purposes. What it doesn't include is the database drivers that require installation of a pecl extension.

While checking on the request issue / support request TimWolla/docker-adminer#68 I realized that there is no easy way to install pecl extensions in the Alpine variants. phpize + dependencies are not readily available and the automated management lives within the docker-php-ext-* helper scripts.

Thus I'd like to request either a pecl wrapper or helper scripts for the phpize management that does not require me copying over bits and pieces from various scripts that might break when future changes are made.

@wglambert wglambert added the Request Request for image modification or feature label Dec 5, 2019
@tianon
Copy link
Member

tianon commented Dec 5, 2019

I would make a slight adjustment to your steps on TimWolla/docker-adminer#68, since the PHP source isn't necessary:

apk add --no-cache --virtual .phpize-deps-configure $PHPIZE_DEPS
pecl install mongodb
docker-php-ext-enable mongodb
apk del --no-network .phpize-deps-configure

IMO, this is the type of additional effort folks sign up for when they choose to use the (intentionally hyper-minimal) Alpine variants.

More importantly however, I think #851 (thus #840 (comment), etc) is extremely relevant: pecl being included in the core PHP distribution has a short lifespan (deprecated in PHP 7, not planned for inclusion in PHP 8+), so I'd really rather avoid adding any additional behavior that wraps pecl.

@TimWolla
Copy link
Contributor Author

TimWolla commented Dec 6, 2019

since the PHP source isn't necessary:

Thanks. Edited.

IMO, this is the type of additional effort folks sign up for when they choose to use the (intentionally hyper-minimal) Alpine variants.

The additional two commands were not the issue, that's absolutely fine and meets my expectations. The issue I had was that it wasn't documented how to do it properly (or I might've missed it).

pecl being included in the core PHP distribution has a short lifespan (deprecated in PHP 7, not planned for inclusion in PHP 8+), so I'd really rather avoid adding any additional behavior that wraps pecl.

Ah, yeah. I believe I read something about this on the php-internals list before, but I don't really keep track of the threads there (15k unread …). Do you happen to know what the alternative for external extensions would be going forward? Manually downloading the source code from somewhere?

@elovin
Copy link

elovin commented Dec 11, 2019

pecl being included in the core PHP distribution has a short lifespan (deprecated in PHP 7, not planned for inclusion in PHP 8+),

I didn't know this, do you have a link to when this was announced (did some googling but couldn't find anything) ?

@tianon
Copy link
Member

tianon commented Dec 11, 2019

@elovin https://externals.io/message/103977 / php/php-src#3781 / php/php-src@e93d6d9

@tianon
Copy link
Member

tianon commented Jun 8, 2022

I guess the action item here is probably to document our PHPIZE_DEPS variable? 😇

Edit: probably specifically in variant-alpine.md? (since it's not really meaningful in Debian as they're pre-installed there)

@TimWolla
Copy link
Contributor Author

TimWolla commented Jun 8, 2022

I forgot this issue existed and I effectively moved on, since I know what I have to do.

I guess the action item here is probably to document our PHPIZE_DEPS variable? innocent

But yeah, this makes sense to me, probably with the example from #919 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Request Request for image modification or feature
Projects
None yet
Development

No branches or pull requests

4 participants