Skip to content

Commit

Permalink
Fix PHP 7.4 build
Browse files Browse the repository at this point in the history
  • Loading branch information
shyim committed Nov 29, 2019
1 parent 4f6fa7f commit 786f9db
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 8 deletions.
2 changes: 2 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ steps:
repository: 'shyim/shopware-nginx'
command: 'push'
tags: |
php74-xdebug
php73-xdebug
php72-xdebug
php71-xdebug
Expand Down Expand Up @@ -91,3 +92,4 @@ steps:
php71-xdebug
php72-xdebug
php73-xdebug
php74-xdebug
2 changes: 1 addition & 1 deletion functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ modulesPlatform=(base platform)
modulesLocal=(base local)

phpVersions=(php71 php72 php73 php74)
xdebugPhpVersions=(php71 php70 php72 php73)
xdebugPhpVersions=(php71 php70 php72 php73 php74)
mysqlVersions=(55 56 57 8)

function fixHooks()
Expand Down
3 changes: 0 additions & 3 deletions images/generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ for t in ${phpVersions[@]}; do
node "${DIR}/twig.js" nginx/Dockerfile.twig "{\"phpVersion\": \"$dockerPHP\", \"phpVersionNumeric\": $phpVersionNumeric, \"xdebug\": false}" > nginx/${t}/Dockerfile
done

# RC has custom name
node "${DIR}/twig.js" nginx/Dockerfile.twig "{\"phpVersion\": \"rc\", \"phpVersionNumeric\": 7.4, \"xdebug\": false}" > nginx/php74/Dockerfile

for t in ${xdebugPhpVersions[@]}; do
dockerPHP=$(echo "${t:3:1}.${t:4:1}")

Expand Down
15 changes: 14 additions & 1 deletion images/nginx/Dockerfile.twig
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ RUN set -x && \
libzip-dev \
libwebp-dev \
libxml2-dev \
libxslt-dev \
libffi-dev \
pcre-dev \
unzip \
wget \
Expand All @@ -31,11 +33,22 @@ RUN set -x && \
docker-php-ext-configure zip \
--with-libzip && \
docker-php-ext-configure gd \
{% if phpVersionNumeric >= 74 %}
--enable-gd \
--with-freetype \
--with-png \
--with-jpeg \
--with-webp && \
{% else %}
--with-gd \
--with-freetype-dir=/usr/include/ \
--with-png-dir=/usr/include/ \
--with-jpeg-dir=/usr/include/ \
--with-webp-dir && \
{% endif %}
{% if phpVersionNumeric >= 74 %}
docker-php-ext-configure ffi --with-ffi && \
{% endif %}
docker-php-ext-install -j$(nproc) \
bcmath \
gd \
Expand All @@ -46,7 +59,7 @@ RUN set -x && \
bz2 \
intl \
soap \
zip > /dev/null && \
zip {% if phpVersionNumeric >= 74 %} ffi {% endif %} > /dev/null && \
update-ca-certificates && \
ln -s /usr/local/bin/php /usr/bin/php && \
ln -sf /dev/stdout /var/log/nginx/access.log && \
Expand Down
20 changes: 17 additions & 3 deletions images/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 786f9db

Please sign in to comment.