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

[bitnami/wordpress] [bitnami/wordpress-nginx] Support for PHP Redis Extension in Bitnami WordPress & WordPress-NGINX Containers #79080

Open
LucaDev opened this issue Mar 23, 2025 · 4 comments
Assignees
Labels
feature-request on-hold Issues or Pull Requests with this label will never be considered stale wordpress

Comments

@LucaDev
Copy link
Contributor

LucaDev commented Mar 23, 2025

Name and Version

bitnami/wordpress and bitnami/wordpress-nginx

What is the problem this feature will solve?

I would like to add support for the PHP Redis extension (php-redis) to the Bitnami WordPress and WordPress-NGINX containers. Right now, one way to do this would be to compile it manually in each Dockerfile, but that would add a lot of extra code to each Dockerfile, which seems inefficient.

What is the feature you are proposing to solve the problem?

Would it be possible to:

Ship php-redis along with the Bitnami PHP component (perhaps disabled by default)?
or
Compile it centrally for the relevant PHP version and make it downloadable as a separate component (via stacksmith)?

This has already been requested in issue #16124, and having php-redis available would help many plugins, such as W3 Total Cache.

Here’s an example of how I would integrate it via Dockerfile:

FROM docker.io/bitnami/minideb:bookworm AS builder
 ARG DOWNLOADS_URL="downloads.bitnami.com/files/stacksmith"
 ARG TARGETARCH
 
 ENV HOME="/" \
   OS_ARCH="${TARGETARCH:-amd64}" \
   OS_FLAVOUR="debian-12" \
   OS_NAME="linux"
 
 SHELL ["/bin/bash", "-o", "errexit", "-o", "nounset", "-o", "pipefail", "-c"]
 
 RUN install_packages autoconf build-essential curl ca-certificates
 RUN mkdir -p /tmp/bitnami/pkg/cache/ ; cd /tmp/bitnami/pkg/cache/ ; mkdir /opt/bitnami ; \
   COMPONENTS=( \
   "php-8.2.27-11-linux-${OS_ARCH}-debian-12" \
   ) ; \
   for COMPONENT in "${COMPONENTS[@]}"; do \
   if [ ! -f "${COMPONENT}.tar.gz" ]; then \
   curl -SsLf "https://${DOWNLOADS_URL}/${COMPONENT}.tar.gz" -O ; \
   curl -SsLf "https://${DOWNLOADS_URL}/${COMPONENT}.tar.gz.sha256" -O ; \
   fi ; \
   sha256sum -c "${COMPONENT}.tar.gz.sha256" ; \
   tar -zxf "${COMPONENT}.tar.gz" -C /opt/bitnami --strip-components=2 --no-same-owner --wildcards '*/files' ; \
   rm -rf "${COMPONENT}".tar.gz{,.sha256} ; \
   done
 RUN cd / ; \
    curl -SsLf https://pecl.php.net/get/redis-6.1.0.tgz | tar xzf - ; mv redis-* redis ; cd redis ; \
    /opt/bitnami/php/bin/phpize ; \
    ./configure --with-php-config=/opt/bitnami/php/bin/php-config ; \
    make 

[...]
And finally in the the actual container:

COPY --from=builder /redis/modules/redis.so /opt/bitnami/php/lib/php/extensions/
RUN echo "extension=redis.so" >> /opt/bitnami/php/etc/php.ini

I am happy to contribute the implementation, but I need guidance on the best approach.

What alternatives have you considered?

No response

@github-actions github-actions bot added the triage Triage is needed label Mar 23, 2025
@javsalgar
Copy link
Contributor

Thank you so much for opening the ticket. Let me forward this to engineering team for reconsideration.

@javsalgar javsalgar added the on-hold Issues or Pull Requests with this label will never be considered stale label Mar 24, 2025
@github-actions github-actions bot removed the triage Triage is needed label Mar 24, 2025
@LucaDev
Copy link
Contributor Author

LucaDev commented Apr 2, 2025

Hey @javsalgar, any news on this yet? Seems like more people need/want the redis extension 😄

@javsalgar
Copy link
Contributor

Hi,

I'm afraid that we currently have no bandwidth to work on this. As soon as we have more news we will update this ticket

@LucaDev
Copy link
Contributor Author

LucaDev commented Apr 4, 2025

Alright.
Keep in mind: I'd be glad to implement this for you. I just need a slight guidance on your preferred way of accomplishing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request on-hold Issues or Pull Requests with this label will never be considered stale wordpress
Projects
None yet
Development

No branches or pull requests

2 participants