Skip to content

Instantly share code, notes, and snippets.

@ziodave
Last active March 14, 2024 13:51
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ziodave/20ab49f5ea2e6e500255c7e5ff1fd5e2 to your computer and use it in GitHub Desktop.
Save ziodave/20ab49f5ea2e6e500255c7e5ff1fd5e2 to your computer and use it in GitHub Desktop.
bitnami-docker-wordpress-nginx / Dockerfile patch to add php-redis
diff --git a/6/debian-12/Dockerfile b/6/debian-12/Dockerfile
index 7bce99f..64678a4 100644
--- a/6/debian-12/Dockerfile
+++ b/6/debian-12/Dockerfile
@@ -32,6 +32,34 @@ ENV APP_VERSION="6.0.0" \
NGINX_HTTP_PORT_NUMBER="" \
PATH="/opt/bitnami/common/bin:/opt/bitnami/php/bin:/opt/bitnami/php/sbin:/opt/bitnami/wp-cli/bin:/opt/bitnami/nginx/sbin:/opt/bitnami/mysql/bin:$PATH"
+ARG REDIS_VERSION=5.3.7
+RUN set -ex ; \
+ \
+ savedAptMark="$(apt-mark showmanual)" ; \
+ \
+ apt-get update ; \
+ apt-get upgrade -y ; \
+ apt-get install -y --no-install-recommends \
+ autoconf \
+ build-essential \
+ wget ; \
+ \
+ wget -q https://pecl.php.net/get/redis-$REDIS_VERSION.tgz ; \
+ tar xzf redis-$REDIS_VERSION.tgz ; \
+ cd redis-$REDIS_VERSION ; \
+ \
+ phpize ; \
+ ./configure ; \
+ make ; \
+ make install ; \
+ cd .. ; \
+ rm -fr redis-$REDIS_VERSION ; \
+ \
+ apt-mark auto '.*' > /dev/null; \
+ apt-mark manual $savedAptMark; \
+ apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
+ rm -rf /var/lib/apt/lists/*
+
EXPOSE 8080 8443
USER 1001
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment