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
Can't enable Memcached on php:7.4-fpm-alpine #1132
Comments
There's a docs entry for installing extensions https://github.com/docker-library/docs/tree/master/php#how-to-install-more-php-extensions $ docker build -t php:test - << EOF
FROM php:7.4-fpm-alpine
RUN apk add libmemcached-dev libmemcached autoconf pkgconfig g++ zlib-dev make && pecl install memcached && \
docker-php-ext-enable memcached && apk del make g++ autoconf pkgconfig
EOF
Sending build context to Docker daemon 2.048kB
Step 1/2 : FROM php:7.4-fpm-alpine
---> 597b78d02952
Step 2/2 : RUN apk add libmemcached-dev libmemcached autoconf pkgconfig g++ zlib-dev make && pecl install memcached && docker-php-ext-enable memcached && apk del make g++ autoconf pkgconfig
---> Using cache
---> 3408f876001f
Successfully built 3408f876001f
Successfully tagged php:test
$ docker run --rm php:test php -m | grep memcached
memcached See also #575 (comment)
And any reason why you're opting to install Apache in the |
@wglambert this solved my issue, thanks! Basically I can't install extensions with |
When you install via apk, you send up with two versions of PHP in the image
(ours and Alpine's), with a very low chance of compatible extensions.
You might be interested in the CLI variant (which is roughly the same as
FPM but without the FPM binary).
|
@tianon thanks for the explanation. What are the advantage of using CLI variant? I need fpm anyway... |
Ah sorry, I misunderstood and thought FPM was just dead weight for your use
case; my apologies!
|
Hello, i'm trying to add memcached support to
php:7.4-fpm-alpine
, below my Dockerfile.The container build without any error, but if from within the container I do
php -m
can't see the memcached module loaded.I'm on Mac OS 10.11.6, Docker CE Version 18.06.1-ce-mac73 (26764).
The text was updated successfully, but these errors were encountered: