File tree Expand file tree Collapse file tree 10 files changed +56
-35
lines changed
Expand file tree Collapse file tree 10 files changed +56
-35
lines changed Original file line number Diff line number Diff line change @@ -108,12 +108,16 @@ RUN set -xe \
108108 libedit-dev \
109109 libsodium-dev \
110110 libxml2-dev \
111+ oniguruma-dev \
111112 openssl-dev \
112113 sqlite-dev \
113114 \
114115 && export CFLAGS="$PHP_CFLAGS" \
115116 CPPFLAGS="$PHP_CPPFLAGS" \
116117 LDFLAGS="$PHP_LDFLAGS" \
118+ # fix ARGON2 detection for 7.4-alpha1 https://github.com/docker-library/php/pull/840#pullrequestreview-249660894
119+ ARGON2_LIBS="-largon2" \
120+ ARGON2_CFLAGS="-I/usr/include" \
117121 && docker-php-source extract \
118122 && cd /usr/src/php \
119123 && gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
@@ -171,9 +175,8 @@ RUN set -xe \
171175 \
172176 && apk del --no-network .build-deps \
173177 \
174- # https://github.com/docker-library/php/issues/443
175- && pecl update-channels \
176- && rm -rf /tmp/pear ~/.pearrc
178+ # smoke test
179+ && php --version
177180
178181COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
179182
Original file line number Diff line number Diff line change @@ -109,12 +109,16 @@ RUN set -xe \
109109 libedit-dev \
110110 libsodium-dev \
111111 libxml2-dev \
112+ oniguruma-dev \
112113 openssl-dev \
113114 sqlite-dev \
114115 \
115116 && export CFLAGS="$PHP_CFLAGS" \
116117 CPPFLAGS="$PHP_CPPFLAGS" \
117118 LDFLAGS="$PHP_LDFLAGS" \
119+ # fix ARGON2 detection for 7.4-alpha1 https://github.com/docker-library/php/pull/840#pullrequestreview-249660894
120+ ARGON2_LIBS="-largon2" \
121+ ARGON2_CFLAGS="-I/usr/include" \
118122 && docker-php-source extract \
119123 && cd /usr/src/php \
120124 && gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
@@ -172,9 +176,8 @@ RUN set -xe \
172176 \
173177 && apk del --no-network .build-deps \
174178 \
175- # https://github.com/docker-library/php/issues/443
176- && pecl update-channels \
177- && rm -rf /tmp/pear ~/.pearrc
179+ # smoke test
180+ && php --version
178181
179182COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
180183
Original file line number Diff line number Diff line change @@ -109,12 +109,16 @@ RUN set -xe \
109109 libedit-dev \
110110 libsodium-dev \
111111 libxml2-dev \
112+ oniguruma-dev \
112113 openssl-dev \
113114 sqlite-dev \
114115 \
115116 && export CFLAGS="$PHP_CFLAGS" \
116117 CPPFLAGS="$PHP_CPPFLAGS" \
117118 LDFLAGS="$PHP_LDFLAGS" \
119+ # fix ARGON2 detection for 7.4-alpha1 https://github.com/docker-library/php/pull/840#pullrequestreview-249660894
120+ ARGON2_LIBS="-largon2" \
121+ ARGON2_CFLAGS="-I/usr/include" \
118122 && docker-php-source extract \
119123 && cd /usr/src/php \
120124 && gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
@@ -172,9 +176,8 @@ RUN set -xe \
172176 \
173177 && apk del --no-network .build-deps \
174178 \
175- # https://github.com/docker-library/php/issues/443
176- && pecl update-channels \
177- && rm -rf /tmp/pear ~/.pearrc
179+ # smoke test
180+ && php --version
178181
179182COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
180183
Original file line number Diff line number Diff line change @@ -173,6 +173,7 @@ RUN set -eux; \
173173 apt-get install -y --no-install-recommends \
174174 libcurl4-openssl-dev \
175175 libedit-dev \
176+ libonig-dev \
176177 libsodium-dev \
177178 libsqlite3-dev \
178179 libssl-dev \
@@ -268,11 +269,8 @@ RUN set -eux; \
268269 ; \
269270 apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
270271 \
271- php --version; \
272- \
273- # https://github.com/docker-library/php/issues/443
274- pecl update-channels; \
275- rm -rf /tmp/pear ~/.pearrc
272+ # smoke test
273+ php --version
276274
277275COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
278276
Original file line number Diff line number Diff line change @@ -113,6 +113,7 @@ RUN set -eux; \
113113 apt-get install -y --no-install-recommends \
114114 libcurl4-openssl-dev \
115115 libedit-dev \
116+ libonig-dev \
116117 libsodium-dev \
117118 libsqlite3-dev \
118119 libssl-dev \
@@ -208,11 +209,8 @@ RUN set -eux; \
208209 ; \
209210 apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
210211 \
211- php --version; \
212- \
213- # https://github.com/docker-library/php/issues/443
214- pecl update-channels; \
215- rm -rf /tmp/pear ~/.pearrc
212+ # smoke test
213+ php --version
216214
217215COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
218216
Original file line number Diff line number Diff line change @@ -114,6 +114,7 @@ RUN set -eux; \
114114 apt-get install -y --no-install-recommends \
115115 libcurl4-openssl-dev \
116116 libedit-dev \
117+ libonig-dev \
117118 libsodium-dev \
118119 libsqlite3-dev \
119120 libssl-dev \
@@ -209,11 +210,8 @@ RUN set -eux; \
209210 ; \
210211 apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
211212 \
212- php --version; \
213- \
214- # https://github.com/docker-library/php/issues/443
215- pecl update-channels; \
216- rm -rf /tmp/pear ~/.pearrc
213+ # smoke test
214+ php --version
217215
218216COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
219217
Original file line number Diff line number Diff line change @@ -114,6 +114,7 @@ RUN set -eux; \
114114 apt-get install -y --no-install-recommends \
115115 libcurl4-openssl-dev \
116116 libedit-dev \
117+ libonig-dev \
117118 libsodium-dev \
118119 libsqlite3-dev \
119120 libssl-dev \
@@ -209,11 +210,8 @@ RUN set -eux; \
209210 ; \
210211 apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
211212 \
212- php --version; \
213- \
214- # https://github.com/docker-library/php/issues/443
215- pecl update-channels; \
216- rm -rf /tmp/pear ~/.pearrc
213+ # smoke test
214+ php --version
217215
218216COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
219217
Original file line number Diff line number Diff line change @@ -102,12 +102,16 @@ RUN set -xe \
102102 libedit-dev \
103103 libsodium-dev \
104104 libxml2-dev \
105+ oniguruma-dev \
105106 openssl-dev \
106107 sqlite-dev \
107108 \
108109 && export CFLAGS="$PHP_CFLAGS" \
109110 CPPFLAGS="$PHP_CPPFLAGS" \
110111 LDFLAGS="$PHP_LDFLAGS" \
112+ # fix ARGON2 detection for 7.4-alpha1 https://github.com/docker-library/php/pull/840#pullrequestreview-249660894
113+ ARGON2_LIBS="-largon2" \
114+ ARGON2_CFLAGS="-I/usr/include" \
111115 && docker-php-source extract \
112116 && cd /usr/src/php \
113117 && gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
@@ -165,9 +169,11 @@ RUN set -xe \
165169 \
166170 && apk del --no-network .build-deps \
167171 \
168- # https://github.com/docker-library/php/issues/443
172+ # update pecl channel definitions https://github.com/docker-library/php/issues/443
169173 && pecl update-channels \
170- && rm -rf /tmp/pear ~/.pearrc
174+ && rm -rf /tmp/pear ~/.pearrc \
175+ # smoke test
176+ && php --version
171177
172178COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
173179
Original file line number Diff line number Diff line change @@ -107,6 +107,7 @@ RUN set -eux; \
107107 apt-get install -y --no-install-recommends \
108108 libcurl4-openssl-dev \
109109 libedit-dev \
110+ libonig-dev \
110111 libsodium-dev \
111112 libsqlite3-dev \
112113 libssl-dev \
@@ -202,11 +203,11 @@ RUN set -eux; \
202203 ; \
203204 apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
204205 \
205- php --version; \
206- \
207- # https://github.com/docker-library/php/issues/443
206+ # update pecl channel definitions https://github.com/docker-library/php/issues/443
208207 pecl update-channels; \
209- rm -rf /tmp/pear ~/.pearrc
208+ rm -rf /tmp/pear ~/.pearrc; \
209+ # smoke test
210+ php --version
210211
211212COPY docker-php-ext-* docker-php-entrypoint /usr/local/bin/
212213
Original file line number Diff line number Diff line change @@ -160,6 +160,19 @@ for version in "${versions[@]}"; do
160160 -e ' /argon2/d' \
161161 " $version /$suite /$variant /Dockerfile"
162162 fi
163+ if [ " $majorVersion " = ' 7' -a " $minorVersion " -lt ' 4' ]; then
164+ # oniguruma is part of mbstring in php 7.4+
165+ # ARGON2 is a hack only required for alpha1: https://github.com/docker-library/php/pull/840#pullrequestreview-249660894
166+ sed -ri \
167+ -e ' /oniguruma-dev|libonig-dev/d' \
168+ -e ' /ARGON2/d' \
169+ " $version /$suite /$variant /Dockerfile"
170+ else
171+ # 7.4 and above no longer include pecl/pear: https://github.com/php/php-src/pull/3781
172+ sed -ri \
173+ -e ' \!pecl.*channel|/tmp/pear!d' \
174+ " $version /$suite /$variant /Dockerfile"
175+ fi
163176 if [ " $majorVersion " = ' 7' -a " $minorVersion " -lt ' 2' ]; then
164177 # sodium is part of php core 7.2+ https://wiki.php.net/rfc/libsodium
165178 sed -ri ' /sodium/d' " $version /$suite /$variant /Dockerfile"
You can’t perform that action at this time.
0 commit comments