Skip to content
Snippets Groups Projects
Verified Commit 7b490835 authored by Maarten de Waard's avatar Maarten de Waard :angel:
Browse files

copy install-php-extensions commands from current WordPress dockerfile

parent be35f56c
No related branches found
No related tags found
1 merge request!49Update php Docker tag to v8
Pipeline #9029 passed with stage
in 4 minutes and 39 seconds
......@@ -2,18 +2,33 @@
# install the PHP extensions (from the WP Dockerfile)
set -ex;
savedAptMark="$(apt-mark showmanual)";
apt-get update;
apt-get install -y --no-install-recommends \
libfreetype6-dev \
libjpeg-dev \
libmagickwand-dev \
libpng-dev \
libzip-dev \
;
libwebp-dev \
libzip-dev;
docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr;
docker-php-ext-install gd mysqli opcache zip;
docker-php-ext-configure gd \
--with-freetype \
--with-jpeg \
--with-webp \
;
docker-php-ext-install -j "$(nproc)" \
bcmath \
exif \
gd \
mysqli \
zip \
;
# https://pecl.php.net/package/imagick
pecl install imagick-3.5.0;
docker-php-ext-enable imagick;
rm -r /tmp/pear;
# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
apt-mark auto '.*' > /dev/null;
......@@ -24,7 +39,7 @@ ldd "$(php -r 'echo ini_get("extension_dir");')"/*.so \
| xargs -r dpkg-query -S \
| cut -d: -f1 \
| sort -u \
| xargs -rt apt-mark manual; \
| xargs -rt apt-mark manual;
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false;
rm -rf /var/lib/apt/lists/*
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment