Completing WordPress Health Check inside Docker

Missing Modules

It is very tempting to simply use the official WordPress Docker image. However, new feature HEALH CHECK in 5.X – you will observe a recommendation – something like following:

Missing Modules in WordPress Docker

To sum up – bcmath, exif and imagick are not installed in wordpress docker image by default.

Resolution

The same way we added Imagick in PHP Docker, You can create your own Dockerfile instead of using image directly as following:

FROM wordpress:5.2.0-php7.3-apache
# Better WordPress Health-Check
# Install Imagick
RUN apt-get update && apt-get install -y libmagickwand-dev --no-install-recommends && rm -rf /var/lib/apt/lists/*
RUN printf "\n" | pecl install imagick
RUN docker-php-ext-enable imagick
# Install bcmath and exif
RUN docker-php-ext-install bcmath exif

Great Job! Everything is running smoothly here.

Completing WordPress Health Check inside Docker

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to top