From c0fdc08f1405866b470f2f8b1d8ba83d2665f4cd Mon Sep 17 00:00:00 2001 From: Amoifr <31698966+Amoifr@users.noreply.github.com> Date: Thu, 26 Sep 2024 18:03:28 +0200 Subject: [PATCH] Add docker configuration for gd library (#816) Co-authored-by: pcescon --- bundles/media/imagine-adapter.rst | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/bundles/media/imagine-adapter.rst b/bundles/media/imagine-adapter.rst index f02ba2a0..1766a966 100644 --- a/bundles/media/imagine-adapter.rst +++ b/bundles/media/imagine-adapter.rst @@ -15,6 +15,20 @@ GD The simplest adapter is GD and it has no external dependencies besides the PHP extension. +**Docker:** + +To use the GD extension, you need to install it with docker-php-ext-install. However, GD requires Linux libraries to function properly. Depending on the type of file you want to generate (such as JPG, PNG, or WebP), you also need to install the corresponding libraries. +..code-block:: bash + + RUN apt-get update && apt-get install -y \ + libfreetype6-dev \ + libwebp-dev \ + libjpeg62-turbo-dev \ + libpng-dev \ + && docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp \ + && docker-php-ext-install -j$(nproc) gd \ + + Imagick -------