3

Within my Dockerfile I do the following:

FROM urre/wordpress-nginx-docker-compose-image

# ... various other things ...

RUN apt-get update \
    && apt-get -y --no-install-recommends install \
        webp \
        imagemagick \
        libmagickwand-dev \
        libwebp-dev

This is basically running but when I do phpinfo(); webp is not within the supported formats:

Imagick PHPInfo

Tried various other things but nothing seems to work. Does anybody have some experience on how to add this correctly with Docker?

Blackbam
  • 17,496
  • 26
  • 97
  • 150
  • How are you installing PHP is the real question. – Sherif Feb 28 '20 at 10:58
  • Does this answer the real question: https://github.com/urre/wordpress-nginx-docker-compose-image/blob/master/Dockerfile ? It seems like webp support is not added there so how can I add it later? – Blackbam Feb 28 '20 at 11:06
  • 2
    The Imagick extension has to be compiled against the libwebp* headers in order to provide webp support. Whoever compiled your extension obviously didn't compile it against that library. Installing the library after the fact won't change anything. You can either find another package that supports it or compile the extension yourself. – Sherif Feb 28 '20 at 11:12
  • Ok thank you this is already good to know. Maybe I could uninstal the extension and re-install it correctly within the Docker image? – Blackbam Feb 28 '20 at 11:22

0 Answers0