Skip to content

Commit 35d6eb7

Browse files
committed
Added support for "webp" with GD
* Improved Makefile
1 parent 79f2c47 commit 35d6eb7

File tree

9 files changed

+30
-27
lines changed

9 files changed

+30
-27
lines changed

Makefile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,24 @@
11
REPOSITORY?=jsunier/php-symfony-test
22
BUILD_DATE="$(shell date -u +"%Y-%m-%dT%H:%m:%SZ")"
3-
PRESTISSIMO_VERSION=0.3.9
3+
PRESTISSIMO_VERSION=0.3.10
44
VERSIONS=7.4 7.3 7.2 7.1
55
LATEST_VERSION=7.4
66

7+
.PHONY: build-mysql
78
build-mysql:
89
for VERSION in $(VERSIONS); do \
910
docker build php$$VERSION/mysql --build-arg PRESTISSIMO_VERSION=$$PRESTISSIMO_VERSION --build-arg BUILD_DATE=$$BUILD_DATE -t $(REPOSITORY):php$$VERSION-mysql -t $(REPOSITORY):php$$VERSION-mariadb; \
1011
done
1112
docker build php${LATEST_VERSION}/mysql --build-arg PRESTISSIMO_VERSION=$$PRESTISSIMO_VERSION --build-arg BUILD_DATE=$$BUILD_DATE -t $(REPOSITORY):latest -t $(REPOSITORY):latest-mysql
1213

14+
.PHONY: build-postgresql
1315
build-postgresql:
1416
for VERSION in $(VERSIONS); do \
1517
docker build php$$VERSION/postgresql --build-arg PRESTISSIMO_VERSION=$$PRESTISSIMO_VERSION --build-arg BUILD_DATE=$$BUILD_DATE -t $(REPOSITORY):php$$VERSION-postgresql; \
1618
done
1719
docker build php${LATEST_VERSION}/postgresql --build-arg PRESTISSIMO_VERSION=$$PRESTISSIMO_VERSION --build-arg BUILD_DATE=$$BUILD_DATE -t $(REPOSITORY):latest-postgresql
1820

21+
.PHONY: push-myswl
1922
push-mysql:
2023
for VERSION in $(VERSIONS); do \
2124
docker push $(REPOSITORY):php$$VERSION-mysql; \
@@ -24,12 +27,12 @@ push-mysql:
2427
docker push $(REPOSITORY):latest
2528
docker push $(REPOSITORY):latest-mysql
2629

30+
.PHONY: push-postgresql
2731
push-postgresql:
2832
for VERSION in $(VERSIONS); do \
2933
docker push $(REPOSITORY):php$$VERSION-postgresql; \
3034
done
3135
docker push $(REPOSITORY):latest-postgresql
3236

33-
all: build-mysql build-postgresql push-mysql push-postgresql
34-
3537
.PHONY: all
38+
all: build-mysql build-postgresql push-mysql push-postgresql

php7.1/mysql/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ LABEL maintainer="Joël Sunier <jsunier@stogon.io>" \
88
php.pdo_connector="MySQL" \
99
org.label-schema.build-date=${BUILD_DATE}
1010

11-
RUN apt-get update && apt-get install -yqq git curl libmcrypt-dev libjpeg-dev libpng-dev libfreetype6-dev libbz2-dev libxml2-dev libmagickwand-dev libpq-dev unzip && \
11+
RUN apt-get update && apt-get install -yqq git curl libmcrypt-dev libjpeg-dev libpng-dev libfreetype6-dev libbz2-dev libxml2-dev libmagickwand-dev libpq-dev libwebp-dev unzip && \
1212
docker-php-ext-install mbstring pdo pdo_mysql zip iconv opcache bcmath sockets soap && \
13-
docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ && \
13+
docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ --with-webp-dir=/usr/include/ && \
1414
docker-php-ext-install gd && \
1515
pecl install imagick xdebug-2.6.1 && \
1616
docker-php-ext-enable imagick xdebug && \
@@ -33,6 +33,6 @@ RUN chmod a+wrx /usr/local/bin/composer
3333
VOLUME [ "/app" ]
3434

3535
USER symfony
36-
RUN composer global require --no-interaction --no-progress hirak/prestissimo:0.3.9
36+
RUN composer global require --no-interaction --no-progress hirak/prestissimo:0.3.10
3737

3838
CMD [ "/app/bin/console" ]

php7.1/postgresql/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ LABEL maintainer="Joël Sunier <jsunier@stogon.io>" \
88
php.pdo_connector="PostgreSQL" \
99
org.label-schema.build-date=${BUILD_DATE}
1010

11-
RUN apt-get update && apt-get install -yqq git curl libmcrypt-dev libjpeg-dev libpng-dev libfreetype6-dev libbz2-dev libxml2-dev libmagickwand-dev libpq-dev unzip && \
11+
RUN apt-get update && apt-get install -yqq git curl libmcrypt-dev libjpeg-dev libpng-dev libfreetype6-dev libbz2-dev libxml2-dev libmagickwand-dev libpq-dev libwebp-dev unzip && \
1212
docker-php-ext-install mbstring pdo_pgsql zip iconv opcache bcmath sockets soap && \
1313
docker-php-ext-configure pgsql -with-pgsql=/usr/local/pgsql && \
14-
docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ && \
14+
docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ --with-webp-dir=/usr/include/ && \
1515
docker-php-ext-install pdo pdo_pgsql pgsql gd && \
1616
pecl install imagick xdebug-2.6.1 && \
1717
docker-php-ext-enable imagick xdebug && \
@@ -34,6 +34,6 @@ RUN chmod a+wrx /usr/local/bin/composer
3434
VOLUME [ "/app" ]
3535

3636
USER symfony
37-
RUN composer global require --no-interaction --no-progress hirak/prestissimo:0.3.9
37+
RUN composer global require --no-interaction --no-progress hirak/prestissimo:0.3.10
3838

3939
CMD [ "/app/bin/console" ]

php7.2/mysql/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ LABEL maintainer="Joël Sunier <jsunier@stogon.io>" \
88
php.pdo_connector="MySQL" \
99
org.label-schema.build-date=${BUILD_DATE}
1010

11-
RUN apt-get update && apt-get install -yqq git curl libmcrypt-dev libjpeg-dev libpng-dev libfreetype6-dev libbz2-dev libxml2-dev libmagickwand-dev libpq-dev unzip && \
11+
RUN apt-get update && apt-get install -yqq git curl libmcrypt-dev libjpeg-dev libpng-dev libfreetype6-dev libbz2-dev libxml2-dev libmagickwand-dev libpq-dev libwebp-dev unzip && \
1212
docker-php-ext-install mbstring pdo pdo_mysql zip iconv opcache bcmath sockets soap && \
13-
docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ && \
13+
docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ --with-webp-dir=/usr/include/ && \
1414
docker-php-ext-install gd && \
1515
pecl install imagick xdebug-2.6.1 && \
1616
docker-php-ext-enable imagick xdebug && \
@@ -33,6 +33,6 @@ RUN chmod a+wrx /usr/local/bin/composer
3333
VOLUME [ "/app" ]
3434

3535
USER symfony
36-
RUN composer global require --no-interaction --no-progress hirak/prestissimo:0.3.9
36+
RUN composer global require --no-interaction --no-progress hirak/prestissimo:0.3.10
3737

3838
CMD [ "/app/bin/console" ]

php7.2/postgresql/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ LABEL maintainer="Joël Sunier <jsunier@stogon.io>" \
88
php.pdo_connector="PostgreSQL" \
99
org.label-schema.build-date=${BUILD_DATE}
1010

11-
RUN apt-get update && apt-get install -yqq git curl libmcrypt-dev libjpeg-dev libpng-dev libfreetype6-dev libbz2-dev libxml2-dev libmagickwand-dev libpq-dev unzip && \
11+
RUN apt-get update && apt-get install -yqq git curl libmcrypt-dev libjpeg-dev libpng-dev libfreetype6-dev libbz2-dev libxml2-dev libmagickwand-dev libpq-dev libwebp-dev unzip && \
1212
docker-php-ext-install mbstring pdo_pgsql zip iconv opcache bcmath sockets soap && \
1313
docker-php-ext-configure pgsql -with-pgsql=/usr/local/pgsql && \
14-
docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ && \
14+
docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ --with-webp-dir=/usr/include/ && \
1515
docker-php-ext-install pdo pdo_pgsql pgsql gd && \
1616
pecl install imagick xdebug-2.6.1 && \
1717
docker-php-ext-enable imagick xdebug && \
@@ -34,6 +34,6 @@ RUN chmod a+wrx /usr/local/bin/composer
3434
VOLUME [ "/app" ]
3535

3636
USER symfony
37-
RUN composer global require --no-interaction --no-progress hirak/prestissimo:0.3.9
37+
RUN composer global require --no-interaction --no-progress hirak/prestissimo:0.3.10
3838

3939
CMD [ "/app/bin/console" ]

php7.3/mysql/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ LABEL maintainer="Joël Sunier <jsunier@stogon.io>" \
88
php.pdo_connector="MySQL" \
99
org.label-schema.build-date=${BUILD_DATE}
1010

11-
RUN apt-get update && apt-get install -yqq git curl libmcrypt-dev libjpeg-dev libpng-dev libfreetype6-dev libbz2-dev libxml2-dev libmagickwand-dev libpq-dev libzip-dev unzip && \
11+
RUN apt-get update && apt-get install -yqq git curl libmcrypt-dev libjpeg-dev libpng-dev libfreetype6-dev libbz2-dev libxml2-dev libmagickwand-dev libpq-dev libzip-dev libwebp-dev unzip && \
1212
docker-php-ext-install mbstring pdo pdo_mysql zip iconv opcache bcmath sockets soap && \
13-
docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ && \
13+
docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ --with-webp-dir=/usr/include/ && \
1414
docker-php-ext-install gd && \
1515
pecl install imagick xdebug-2.7.1 && \
1616
docker-php-ext-enable imagick xdebug && \
@@ -33,6 +33,6 @@ RUN chmod a+wrx /usr/local/bin/composer
3333
VOLUME [ "/app" ]
3434

3535
USER symfony
36-
RUN composer global require --no-interaction --no-progress hirak/prestissimo:0.3.9
36+
RUN composer global require --no-interaction --no-progress hirak/prestissimo:0.3.10
3737

3838
CMD [ "/app/bin/console" ]

php7.3/postgresql/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ LABEL maintainer="Joël Sunier <jsunier@stogon.io>" \
88
php.pdo_connector="PostgreSQL" \
99
org.label-schema.build-date=${BUILD_DATE}
1010

11-
RUN apt-get update && apt-get install -yqq git curl libmcrypt-dev libjpeg-dev libpng-dev libfreetype6-dev libbz2-dev libxml2-dev libmagickwand-dev libpq-dev libzip-dev unzip && \
11+
RUN apt-get update && apt-get install -yqq git curl libmcrypt-dev libjpeg-dev libpng-dev libfreetype6-dev libbz2-dev libxml2-dev libmagickwand-dev libpq-dev libzip-dev libwebp-dev unzip && \
1212
docker-php-ext-install mbstring pdo_pgsql zip iconv opcache bcmath sockets soap && \
1313
docker-php-ext-configure pgsql -with-pgsql=/usr/local/pgsql && \
14-
docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ && \
14+
docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ --with-webp-dir=/usr/include/ && \
1515
docker-php-ext-install pdo pdo_pgsql pgsql gd && \
1616
pecl install imagick xdebug-2.7.1 && \
1717
docker-php-ext-enable imagick xdebug && \
@@ -34,6 +34,6 @@ RUN chmod a+wrx /usr/local/bin/composer
3434
VOLUME [ "/app" ]
3535

3636
USER symfony
37-
RUN composer global require --no-interaction --no-progress hirak/prestissimo:0.3.9
37+
RUN composer global require --no-interaction --no-progress hirak/prestissimo:0.3.10
3838

3939
CMD [ "/app/bin/console" ]

php7.4/mysql/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ LABEL maintainer="Joël Sunier <jsunier@stogon.io>" \
88
php.pdo_connector="MySQL" \
99
org.label-schema.build-date=${BUILD_DATE}
1010

11-
RUN apt-get update && apt-get install -yqq git curl libmcrypt-dev libjpeg-dev libpng-dev libfreetype6-dev libbz2-dev libxml2-dev libmagickwand-dev libpq-dev libzip-dev unzip && \
11+
RUN apt-get update && apt-get install -yqq git curl libmcrypt-dev libjpeg-dev libpng-dev libfreetype6-dev libbz2-dev libxml2-dev libmagickwand-dev libpq-dev libzip-dev libwebp-dev unzip && \
1212
docker-php-ext-install pdo pdo_mysql zip iconv opcache bcmath sockets soap && \
13-
docker-php-ext-configure gd --with-freetype --with-jpeg && \
13+
docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp && \
1414
docker-php-ext-install gd && \
1515
pecl install imagick xdebug-2.9.0 && \
1616
docker-php-ext-enable imagick xdebug && \
@@ -33,6 +33,6 @@ RUN chmod a+wrx /usr/local/bin/composer
3333
VOLUME [ "/app" ]
3434

3535
USER symfony
36-
RUN composer global require --no-interaction --no-progress hirak/prestissimo:0.3.9
36+
RUN composer global require --no-interaction --no-progress hirak/prestissimo:0.3.10
3737

3838
CMD [ "/app/bin/console" ]

php7.4/postgresql/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ LABEL maintainer="Joël Sunier <jsunier@stogon.io>" \
88
php.pdo_connector="PostgreSQL" \
99
org.label-schema.build-date=${BUILD_DATE}
1010

11-
RUN apt-get update && apt-get install -yqq git curl libmcrypt-dev libjpeg-dev libpng-dev libfreetype6-dev libbz2-dev libxml2-dev libmagickwand-dev libpq-dev libzip-dev unzip && \
11+
RUN apt-get update && apt-get install -yqq git curl libmcrypt-dev libjpeg-dev libpng-dev libfreetype6-dev libbz2-dev libxml2-dev libmagickwand-dev libpq-dev libzip-dev libwebp-dev unzip && \
1212
docker-php-ext-install pdo_pgsql zip iconv opcache bcmath sockets soap && \
1313
docker-php-ext-configure pgsql -with-pgsql=/usr/local/pgsql && \
14-
docker-php-ext-configure gd --with-freetype --with-jpeg && \
14+
docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp && \
1515
docker-php-ext-install pdo pdo_pgsql pgsql gd && \
1616
pecl install imagick xdebug-2.9.0 && \
1717
docker-php-ext-enable imagick xdebug && \
@@ -34,6 +34,6 @@ RUN chmod a+wrx /usr/local/bin/composer
3434
VOLUME [ "/app" ]
3535

3636
USER symfony
37-
RUN composer global require --no-interaction --no-progress hirak/prestissimo:0.3.9
37+
RUN composer global require --no-interaction --no-progress hirak/prestissimo:0.3.10
3838

3939
CMD [ "/app/bin/console" ]

0 commit comments

Comments
 (0)