Skip to content

Commit 835d277

Browse files
authored
Merge pull request #104 from kool-dev/webp_support
Adding WebP Support
2 parents aed55f2 + 001fbcb commit 835d277

File tree

9 files changed

+22
-45
lines changed

9 files changed

+22
-45
lines changed

8.0-prod/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ RUN adduser -D -u 1337 kool \
3131
&& apk add --no-cache --virtual .build-deps $PHPIZE_DEPS \
3232
freetype-dev libpng-dev libjpeg-turbo-dev \
3333
icu-dev libedit-dev libxml2-dev \
34-
imagemagick-dev openldap-dev oniguruma-dev \
34+
imagemagick-dev openldap-dev oniguruma-dev libwebp-dev \
3535
postgresql-dev \
3636
linux-headers \
3737
# php-ext
38-
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
38+
&& docker-php-ext-configure gd --with-freetype --with-webp --with-jpeg \
3939
&& export CFLAGS="$PHP_CFLAGS" CPPFLAGS="$PHP_CPPFLAGS" LDFLAGS="$PHP_LDFLAGS" \
4040
&& docker-php-ext-install -j$(nproc) \
4141
bcmath \

8.0/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ RUN adduser -D -u 1337 kool \
3232
&& apk add --no-cache --virtual .build-deps $PHPIZE_DEPS \
3333
freetype-dev libpng-dev libjpeg-turbo-dev \
3434
icu-dev libedit-dev libxml2-dev \
35-
imagemagick-dev openldap-dev oniguruma-dev \
35+
imagemagick-dev openldap-dev oniguruma-dev libwebp-dev \
3636
postgresql-dev \
3737
linux-headers \
3838
# php-ext
39-
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
39+
&& docker-php-ext-configure gd --with-freetype --with-webp --with-jpeg \
4040
&& export CFLAGS="$PHP_CFLAGS" CPPFLAGS="$PHP_CPPFLAGS" LDFLAGS="$PHP_LDFLAGS" \
4141
&& docker-php-ext-install -j$(nproc) \
4242
bcmath \

8.1-prod/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ RUN adduser -D -u 1337 kool \
3131
&& apk add --no-cache --virtual .build-deps $PHPIZE_DEPS \
3232
freetype-dev libpng-dev libjpeg-turbo-dev \
3333
icu-dev libedit-dev libxml2-dev \
34-
imagemagick-dev openldap-dev oniguruma-dev \
34+
imagemagick-dev openldap-dev oniguruma-dev libwebp-dev \
3535
postgresql-dev \
3636
linux-headers \
3737
# php-ext
38-
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
38+
&& docker-php-ext-configure gd --with-freetype --with-webp --with-jpeg \
3939
&& export CFLAGS="$PHP_CFLAGS" CPPFLAGS="$PHP_CPPFLAGS" LDFLAGS="$PHP_LDFLAGS" \
4040
&& docker-php-ext-install -j$(nproc) \
4141
bcmath \

8.1/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ RUN adduser -D -u 1337 kool \
3232
&& apk add --no-cache --virtual .build-deps $PHPIZE_DEPS \
3333
freetype-dev libpng-dev libjpeg-turbo-dev \
3434
icu-dev libedit-dev libxml2-dev \
35-
imagemagick-dev openldap-dev oniguruma-dev \
35+
imagemagick-dev openldap-dev oniguruma-dev libwebp-dev \
3636
postgresql-dev \
3737
linux-headers \
3838
# php-ext
39-
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
39+
&& docker-php-ext-configure gd --with-freetype --with-webp --with-jpeg \
4040
&& export CFLAGS="$PHP_CFLAGS" CPPFLAGS="$PHP_CPPFLAGS" LDFLAGS="$PHP_LDFLAGS" \
4141
&& docker-php-ext-install -j$(nproc) \
4242
bcmath \

8.2-prod/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ RUN adduser -D -u 1337 kool \
3131
&& apk add --no-cache --virtual .build-deps $PHPIZE_DEPS \
3232
freetype-dev libpng-dev libjpeg-turbo-dev \
3333
icu-dev libedit-dev libxml2-dev \
34-
imagemagick-dev openldap-dev oniguruma-dev \
34+
imagemagick-dev openldap-dev oniguruma-dev libwebp-dev \
3535
postgresql-dev \
3636
linux-headers \
3737
# php-ext
38-
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
38+
&& docker-php-ext-configure gd --with-freetype --with-webp --with-jpeg \
3939
&& export CFLAGS="$PHP_CFLAGS" CPPFLAGS="$PHP_CPPFLAGS" LDFLAGS="$PHP_LDFLAGS" \
4040
&& docker-php-ext-install -j$(nproc) \
4141
bcmath \

8.2/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ RUN adduser -D -u 1337 kool \
3232
&& apk add --no-cache --virtual .build-deps $PHPIZE_DEPS \
3333
freetype-dev libpng-dev libjpeg-turbo-dev \
3434
icu-dev libedit-dev libxml2-dev \
35-
imagemagick-dev openldap-dev oniguruma-dev \
35+
imagemagick-dev openldap-dev oniguruma-dev libwebp-dev \
3636
postgresql-dev \
3737
linux-headers \
3838
# php-ext
39-
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
39+
&& docker-php-ext-configure gd --with-freetype --with-webp --with-jpeg \
4040
&& export CFLAGS="$PHP_CFLAGS" CPPFLAGS="$PHP_CPPFLAGS" LDFLAGS="$PHP_LDFLAGS" \
4141
&& docker-php-ext-install -j$(nproc) \
4242
bcmath \

8.3-prod/Dockerfile

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ RUN adduser -D -u 1337 kool \
3131
&& apk add --no-cache --virtual .build-deps $PHPIZE_DEPS \
3232
freetype-dev libpng-dev libjpeg-turbo-dev \
3333
icu-dev libedit-dev libxml2-dev \
34-
imagemagick-dev openldap-dev oniguruma-dev \
34+
imagemagick-dev openldap-dev oniguruma-dev libwebp-dev \
3535
postgresql-dev \
3636
linux-headers \
3737
# php-ext
38-
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
38+
&& docker-php-ext-configure gd --with-freetype --with-webp --with-jpeg \
3939
&& export CFLAGS="$PHP_CFLAGS" CPPFLAGS="$PHP_CPPFLAGS" LDFLAGS="$PHP_LDFLAGS" \
4040
&& docker-php-ext-install -j$(nproc) \
4141
bcmath \
@@ -57,14 +57,8 @@ RUN adduser -D -u 1337 kool \
5757
mysqli \
5858
ftp \
5959
&& pecl install redis \
60-
&& mkdir /tmp/imagick && cd /tmp/imagick \
61-
&& curl -L -o /tmp/imagick.tar.gz https://github.com/Imagick/imagick/archive/7088edc353f53c4bc644573a79cdcd67a726ae16.tar.gz \
62-
&& tar --strip-components=1 -xf /tmp/imagick.tar.gz \
63-
&& phpize \
64-
&& ./configure \
65-
&& make \
66-
&& make install \
67-
&& echo "extension=imagick.so" > /usr/local/etc/php/conf.d/ext-imagick.ini \
60+
&& pecl install imagick \
61+
&& docker-php-ext-enable imagick \
6862
&& docker-php-ext-enable redis \
6963
&& cp "/usr/local/etc/php/php.ini-production" "/usr/local/etc/php/php.ini" \
7064
# composer

8.3/Dockerfile

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ RUN adduser -D -u 1337 kool \
3232
&& apk add --no-cache --virtual .build-deps $PHPIZE_DEPS \
3333
freetype-dev libpng-dev libjpeg-turbo-dev \
3434
icu-dev libedit-dev libxml2-dev \
35-
imagemagick-dev openldap-dev oniguruma-dev \
35+
imagemagick-dev openldap-dev oniguruma-dev libwebp-dev \
3636
postgresql-dev \
3737
linux-headers \
3838
# php-ext
39-
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
39+
&& docker-php-ext-configure gd --with-freetype --with-webp --with-jpeg \
4040
&& export CFLAGS="$PHP_CFLAGS" CPPFLAGS="$PHP_CPPFLAGS" LDFLAGS="$PHP_LDFLAGS" \
4141
&& docker-php-ext-install -j$(nproc) \
4242
bcmath \
@@ -59,14 +59,8 @@ RUN adduser -D -u 1337 kool \
5959
&& pecl install redis \
6060
&& pecl install xdebug \
6161
&& pecl install pcov && docker-php-ext-enable pcov \
62-
&& mkdir /tmp/imagick && cd /tmp/imagick \
63-
&& curl -L -o /tmp/imagick.tar.gz https://github.com/Imagick/imagick/archive/7088edc353f53c4bc644573a79cdcd67a726ae16.tar.gz \
64-
&& tar --strip-components=1 -xf /tmp/imagick.tar.gz \
65-
&& phpize \
66-
&& ./configure \
67-
&& make \
68-
&& make install \
69-
&& echo "extension=imagick.so" > /usr/local/etc/php/conf.d/ext-imagick.ini \
62+
&& pecl install imagick \
63+
&& docker-php-ext-enable imagick \
7064
&& docker-php-ext-enable redis \
7165
&& cp "/usr/local/etc/php/php.ini-development" "/usr/local/etc/php/php.ini" \
7266
# composer

template/Dockerfile.blade.php

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@
3434
&& apk add --no-cache --virtual .build-deps $PHPIZE_DEPS \
3535
freetype-dev libpng-dev libjpeg-turbo-dev \
3636
icu-dev libedit-dev libxml2-dev \
37-
imagemagick-dev openldap-dev {{ version_compare($version, '7.4', '>=') ? 'oniguruma-dev' : '' }} \
37+
imagemagick-dev openldap-dev {{ version_compare($version, '7.4', '>=') ? 'oniguruma-dev' : '' }} libwebp-dev \
3838
postgresql-dev \
3939
linux-headers \
4040
# php-ext
4141
@if (version_compare($version, '7.4', '>='))
42-
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
42+
&& docker-php-ext-configure gd --with-freetype --with-webp --with-jpeg \
4343
@else
4444
&& docker-php-ext-configure gd \
4545
--with-freetype-dir=/usr/include/ \
@@ -73,19 +73,8 @@
7373
&& pecl install {{ version_compare($version, '8', '>=') ? 'xdebug' : 'xdebug-3.1.6' }} \
7474
&& pecl install pcov && docker-php-ext-enable pcov \
7575
@endif
76-
@if (version_compare($version, '8.2', '<='))
7776
&& pecl install imagick \
7877
&& docker-php-ext-enable imagick \
79-
@else
80-
&& mkdir /tmp/imagick && cd /tmp/imagick \
81-
&& curl -L -o /tmp/imagick.tar.gz https://github.com/Imagick/imagick/archive/7088edc353f53c4bc644573a79cdcd67a726ae16.tar.gz \
82-
&& tar --strip-components=1 -xf /tmp/imagick.tar.gz \
83-
&& phpize \
84-
&& ./configure \
85-
&& make \
86-
&& make install \
87-
&& echo "extension=imagick.so" > /usr/local/etc/php/conf.d/ext-imagick.ini \
88-
@endif
8978
&& docker-php-ext-enable redis \
9079
&& cp "/usr/local/etc/php/php.ini-{{ $prod ? 'production' : 'development' }}" "/usr/local/etc/php/php.ini" \
9180
# composer

0 commit comments

Comments
 (0)