Skip to content

Commit

Permalink
Merge pull request #1544 from docker-library/jq-IN
Browse files Browse the repository at this point in the history
Use jq's `IN()` instead of `index()`
  • Loading branch information
yosifkit authored Oct 16, 2024
2 parents 39c19b7 + cde742a commit 0ce7ef6
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Dockerfile-linux.template
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ RUN set -eux; \
"$APACHE_LOCK_DIR" \
"$APACHE_RUN_DIR" \
"$APACHE_LOG_DIR" \
{{ if [ "bullseye" ] | index(env.suite) then "" else ( -}}
{{ if env.suite == "bullseye" then "" else ( -}}
# https://salsa.debian.org/apache-team/apache2/-/commit/b97ca8714890ead1ba6c095699dde752e8433205
"$APACHE_RUN_DIR/socks" \
{{ ) end -}}
Expand Down Expand Up @@ -326,7 +326,7 @@ RUN set -eux; \
# https://github.com/docker-library/php/issues/822
--with-pic \
\
{{ if [ "8.1" ] | index(env.version | rtrimstr("-rc")) then ( -}}
{{ if env.version | rtrimstr("-rc") == "8.1" then ( -}}
# --enable-ftp is included here for compatibility with existing versions. ftp_ssl_connect() needed ftp to be compiled statically before PHP 7.0 (see https://github.com/docker-library/php/issues/236).
--enable-ftp \
{{ ) else "" end -}}
Expand All @@ -348,7 +348,7 @@ RUN set -eux; \
--with-readline \
--with-zlib \
\
{{ if [ "cli", "zts" ] | index(env.variant) then ( -}}
{{ if env.variant | IN("cli", "zts") then ( -}}
# https://github.com/docker-library/php/pull/1259
--enable-phpdbg \
--enable-phpdbg-readline \
Expand All @@ -360,7 +360,7 @@ RUN set -eux; \
# in PHP 7.4+, the pecl/pear installers are officially deprecated (requiring an explicit "--with-pear")
--with-pear \
\
{{ if [ "8.1", "8.2" ] | index(env.version | rtrimstr("-rc")) then ( -}}
{{ if env.version | rtrimstr("-rc") | IN("8.1", "8.2") then ( -}}
# bundled pcre does not support JIT on riscv64 until 10.41 (php 8.3+)
# https://github.com/PCRE2Project/pcre2/commits/pcre2-10.41/src/sljit/sljitNativeRISCV_64.c
# https://github.com/php/php-src/tree/php-8.3.0/ext/pcre/pcre2lib
Expand All @@ -374,7 +374,7 @@ RUN set -eux; \
--with-libdir="lib/$debMultiarch" \
{{ ) end -}}
{{ # https://github.com/docker-library/php/issues/280 -}}
{{ if [ "cli", "zts" ] | index(env.variant) then "" else ( -}}
{{ if env.variant | IN("cli", "zts") then "" else ( -}}
\
--disable-cgi \
{{ ) end -}}
Expand All @@ -397,7 +397,7 @@ RUN set -eux; \
--enable-zts \
# https://externals.io/message/118859
--disable-zend-signals \
{{ if [ "8.1", "8.2" ] | index(env.version | rtrimstr("-rc")) then ( -}}
{{ if env.version | rtrimstr("-rc") | IN("8.1", "8.2") then ( -}}
--enable-zend-max-execution-timers \
{{ ) else "" end -}}
{{ ) else "" end -}}
Expand Down

0 comments on commit 0ce7ef6

Please sign in to comment.