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

How to install in PHP8 Docker alpine:version image? #177

Open
jonatansantana opened this issue Aug 30, 2021 · 8 comments
Open

How to install in PHP8 Docker alpine:version image? #177

jonatansantana opened this issue Aug 30, 2021 · 8 comments
Labels

Comments

@jonatansantana
Copy link

jonatansantana commented Aug 30, 2021

I tried to install using pecl, curl, pickle and some other suggested ways I found on the internet, but with no success. Is this extension really available for php8?

This work:

 RUN apk --no-cache add \
  php8 \
  php8-curl 

But...

 RUN apk --no-cache add \
  php8 \
  php8-ds  #or php8-pecl-ds

Not work.

I tried using this another way. No error occurs, I assume I have it installed, but I can't use the extension.
I don't know if I need to do anything else. I would like some help with that.

&& mkdir -p /usr/bin/php/ext/ds && curl -fsSL https://pecl.php.net/get/ds | tar xvz -C "/usr/bin/php/ext/ds" --strip 1

@enumag
Copy link

enumag commented Aug 30, 2021

It works just fine using pecl.

FROM php:8.0-alpine

RUN apk add --no-cache ${PHPIZE_DEPS} && \
    pecl install ds && \
    docker-php-ext-enable ds

@jonatansantana
Copy link
Author

jonatansantana commented Aug 30, 2021

Not work for FROM alpine:3.14.
do you know how i can install using this image?

@enumag
Copy link

enumag commented Aug 30, 2021

Well you need to use base PHP image obviously. If you want Alpine 3.14 then it's FROM php:8.0-fpm-alpine3.14

@jonatansantana
Copy link
Author

jonatansantana commented Aug 30, 2021

A feather. I would like to continue using the linux alpine image and install the necessary extensions for me. :/

@enumag
Copy link

enumag commented Sep 15, 2021

Well you still need to install manually from pecl because no official package exists for this extension... So pecl install ds and then add it to php.ini... You will likely need to apk install php8-dev first to use pecl this way.

@rtheunissen
Copy link
Member

@jonatansantana did you get this working? Are you still trying to otherwise?

@dilawar
Copy link

dilawar commented Oct 28, 2023

I get the following output when I do pecl install ds in an alpine image.

Build process completed successfully

**Installing '/usr/local/lib/php/extensions/no-debug-non-zts-20220829/ds.so'**
install ok: channel://pecl.php.net/ds-1.4.0
configuration option "php_ini" is not set to php.ini location
You should add "extension=ds.so" to php.ini
...

I don't think ds.so is installed in correct place?!

@rtheunissen
Copy link
Member

I think you'd still need to enable the extension, I'm not sure that pecl does that for you. This is otherwise a pecl issue and not a fault of this project, right?

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

No branches or pull requests

4 participants