Skip to content

Commit

Permalink
fix(test): download PHP extension from PECL without TLS
Browse files Browse the repository at this point in the history
  • Loading branch information
alquerci committed Jan 20, 2024
1 parent 29b069d commit 0d87488
Show file tree
Hide file tree
Showing 5 changed files with 189 additions and 31 deletions.
20 changes: 17 additions & 3 deletions .docker/php53/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,24 @@ FROM php53
#
RUN set -eux; \
\
pecl install apc-3.1.13; \
echo 'extension=apc.so' >> /usr/local/lib/php.ini; \
packageName=APC; \
packageVersion=3.1.13; \
\
rm -r /tmp/pear;
packageFile=${packageName}-${packageVersion}.tgz; \
\
packageSha256sum=5ef8ba07729e72946e95951672a5378bed98cb5a294e79bf0f0a97ac62829abd; \
\
curl --insecure -sSLfO https://pecl.php.net/get/${packageFile}; \
echo "${packageSha256sum} ${packageFile}" \
| sha256sum -cw --status; \
\
pecl install ${packageFile}; \
rm ${packageFile}; \
\
echo "extension=apc.so" >> /usr/local/lib/php.ini; \
\
rm -r /tmp/pear; \
:;

# Install composer
#
Expand Down
35 changes: 31 additions & 4 deletions .docker/php54/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,35 @@ RUN docker-php-ext-install mbstring
# Install APC PHP extension
#
RUN set -eux; \
pecl install apc-3.1.13; \
docker-php-ext-enable apc; \
rm -r /tmp/pear;
\
packageName=APC; \
packageVersion=3.1.13; \
\
packageFile=${packageName}-${packageVersion}.tgz; \
\
packageSha256sum=5ef8ba07729e72946e95951672a5378bed98cb5a294e79bf0f0a97ac62829abd; \
\
curl --insecure -sSLfO https://pecl.php.net/get/${packageFile}; \
echo "${packageSha256sum} ${packageFile}" \
| sha256sum -cw --status; \
\
pecl install ${packageFile}; \
rm ${packageFile}; \
\
echo "extension=apc.so" >> /usr/local/lib/php.ini; \
\
rm -r /tmp/pear; \
:;

# Install memcache PHP extension
#
ARG MEMCACHE_VERSION
RUN set -eux; \
\
if test x"3.0.8" = x"${MEMCACHE_VERSION}"; then \
packageSha256sum=2cae5b423ffbfd33a259829849f6000d4db018debe3e29ecf3056f06642e8311; \
else :; fi; \
\
buildDeps=' \
libzip-dev \
'; \
Expand All @@ -41,7 +62,13 @@ RUN set -eux; \
$buildDeps \
; \
\
pecl install memcache-${MEMCACHE_VERSION}; \
curl --insecure -sSLfO https://pecl.php.net/get/memcache-${MEMCACHE_VERSION}.tgz; \
echo "${packageSha256sum} memcache-${MEMCACHE_VERSION}.tgz" \
| sha256sum -cw --status; \
\
pecl install memcache-${MEMCACHE_VERSION}.tgz; \
rm memcache-${MEMCACHE_VERSION}.tgz; \
\
docker-php-ext-enable memcache; \
\
apt-get purge -y --force-yes --auto-remove -o APT::AutoRemove::RecommendsImportant=true \
Expand Down
57 changes: 49 additions & 8 deletions .docker/php55_71/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,40 @@ RUN docker-php-ext-install mbstring
ARG APCU_VERSION
RUN set -eux; \
\
test x"" = x"${APCU_VERSION}" || { \
pecl install apcu-${APCU_VERSION}; \
docker-php-ext-enable apcu; \
\
rm -r /tmp/pear; \
}
if test x"" = x"${APCU_VERSION}"; then \
return 0; \
else :; fi; \
\
packageName=apcu; \
packageVersion=${APCU_VERSION}; \
\
packageFile=${packageName}-${packageVersion}.tgz; \
\
if test x"4.0.11" = x"${packageVersion}"; then \
packageSha256sum=454f302ec13a6047ca4c39e081217ce5a61bbea815aec9c1091fb849e70b4d00; \
else :; fi; \
\
if test x"5.1.23" = x"${packageVersion}"; then \
packageSha256sum=454f302ec13a6047ca4c39e081217ce5a61bbea815aec9c1091fb849e70b4d00; \
else :; fi; \
\
curl --insecure -sSLfO https://pecl.php.net/get/${packageFile}; \
echo "${packageSha256sum} ${packageFile}" \
| sha256sum -cw --status; \
\
pecl install ${packageFile}; \
rm ${packageFile}; \
\
docker-php-ext-enable ${packageName}; \
\
rm -r /tmp/pear; \
:;

# Install memcache PHP extension
#
ARG MEMCACHE_VERSION
RUN set -eux; \
\
buildDeps=' \
libzip-dev \
'; \
Expand All @@ -47,8 +70,26 @@ RUN set -eux; \
$buildDeps \
; \
\
pecl install memcache-${MEMCACHE_VERSION}; \
docker-php-ext-enable memcache; \
packageName=memcache; \
packageVersion=${MEMCACHE_VERSION}; \
\
packageFile=${packageName}-${packageVersion}.tgz; \
\
if test x"4.0.5.2" = x"${packageVersion}"; then \
packageSha256sum=7b7667813baea003671f174bbec849e43ff235a8ea4ab7e36c3a0380c2a9ed63; \
else :; fi; \
if test x"3.0.8" = x"${packageVersion}"; then \
packageSha256sum=2cae5b423ffbfd33a259829849f6000d4db018debe3e29ecf3056f06642e8311; \
else :; fi; \
\
curl --insecure -sSLfO https://pecl.php.net/get/${packageFile}; \
echo "${packageSha256sum} ${packageFile}" \
| sha256sum -cw --status; \
\
pecl install ${packageFile}; \
rm ${packageFile}; \
\
docker-php-ext-enable ${packageName}; \
\
apt-get purge -y --force-yes --auto-remove -o APT::AutoRemove::RecommendsImportant=true \
$buildDeps \
Expand Down
50 changes: 42 additions & 8 deletions .docker/php72_73/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,36 @@ RUN docker-php-ext-install mbstring
ARG APCU_VERSION
RUN set -eux; \
\
test x"" = x"${APCU_VERSION}" || { \
pecl install apcu-${APCU_VERSION}; \
docker-php-ext-enable apcu; \
\
rm -r /tmp/pear; \
}
if test x"" = x"${APCU_VERSION}"; then \
return 0; \
else :; fi; \
\
packageName=apcu; \
packageVersion=${APCU_VERSION}; \
\
packageFile=${packageName}-${packageVersion}.tgz; \
\
if test x"5.1.23" = x"${packageVersion}"; then \
packageSha256sum=454f302ec13a6047ca4c39e081217ce5a61bbea815aec9c1091fb849e70b4d00; \
else :; fi; \
\
curl --insecure -sSLfO https://pecl.php.net/get/${packageFile}; \
echo "${packageSha256sum} ${packageFile}" \
| sha256sum -cw --status; \
\
pecl install ${packageFile}; \
rm ${packageFile}; \
\
docker-php-ext-enable ${packageName}; \
\
rm -r /tmp/pear; \
:;

# Install memcache PHP extension
#
ARG MEMCACHE_VERSION
RUN set -eux; \
\
buildDeps=' \
libzip-dev \
'; \
Expand All @@ -29,8 +48,23 @@ RUN set -eux; \
$buildDeps \
; \
\
pecl install memcache-${MEMCACHE_VERSION}; \
docker-php-ext-enable memcache; \
packageName=memcache; \
packageVersion=${MEMCACHE_VERSION}; \
\
packageFile=${packageName}-${packageVersion}.tgz; \
\
if test x"4.0.5.2" = x"${packageVersion}"; then \
packageSha256sum=7b7667813baea003671f174bbec849e43ff235a8ea4ab7e36c3a0380c2a9ed63; \
else :; fi; \
\
curl --insecure -sSLfO https://pecl.php.net/get/${packageFile}; \
echo "${packageSha256sum} ${packageFile}" \
| sha256sum -cw --status; \
\
pecl install ${packageFile}; \
rm ${packageFile}; \
\
docker-php-ext-enable ${packageName}; \
\
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=true \
$buildDeps \
Expand Down
58 changes: 50 additions & 8 deletions .docker/php74_83/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,36 @@ RUN set -eux; \
ARG APCU_VERSION
RUN set -eux; \
\
test x"" = x"${APCU_VERSION}" || { \
pecl install apcu-${APCU_VERSION}; \
docker-php-ext-enable apcu; \
\
rm -r /tmp/pear; \
}
if test x"" = x"${APCU_VERSION}"; then \
return 0; \
else :; fi; \
\
packageName=apcu; \
packageVersion=${APCU_VERSION}; \
\
packageFile=${packageName}-${packageVersion}.tgz; \
\
if test x"5.1.23" = x"${packageVersion}"; then \
packageSha256sum=454f302ec13a6047ca4c39e081217ce5a61bbea815aec9c1091fb849e70b4d00; \
else :; fi; \
\
curl --insecure -sSLfO https://pecl.php.net/get/${packageFile}; \
echo "${packageSha256sum} ${packageFile}" \
| sha256sum -cw --status; \
\
pecl install ${packageFile}; \
rm ${packageFile}; \
\
docker-php-ext-enable ${packageName}; \
\
rm -r /tmp/pear; \
:;

# Install memcache PHP extension
#
ARG MEMCACHE_VERSION
RUN set -eux; \
\
buildDeps=' \
libzip-dev \
'; \
Expand All @@ -41,8 +60,31 @@ RUN set -eux; \
$buildDeps \
; \
\
pecl install memcache-${MEMCACHE_VERSION}; \
docker-php-ext-enable memcache; \
packageName=memcache; \
packageVersion=${MEMCACHE_VERSION}; \
\
packageFile=${packageName}-${packageVersion}.tgz; \
\
if test x"4.0.5.2" = x"${packageVersion}"; then \
packageSha256sum=7b7667813baea003671f174bbec849e43ff235a8ea4ab7e36c3a0380c2a9ed63; \
else :; fi; \
\
if test x"8.0" = x"${packageVersion}"; then \
packageSha256sum=defe33e6f7831d82b7283b95e14a531070531acbf21278f3f0d7050505cf3395; \
else :; fi; \
\
if test x"8.2" = x"${packageVersion}"; then \
packageSha256sum=b3f0640eacdeb9046c6c86a1546d7fb8a4e9f219e5d9a36a287e59b2dd8208e5; \
else :; fi; \
\
curl --insecure -sSLfO https://pecl.php.net/get/${packageFile}; \
echo "${packageSha256sum} ${packageFile}" \
| sha256sum -cw --status; \
\
pecl install ${packageFile}; \
rm ${packageFile}; \
\
docker-php-ext-enable ${packageName}; \
\
apt-get purge -y --force-yes --auto-remove -o APT::AutoRemove::RecommendsImportant=true \
$buildDeps \
Expand Down

0 comments on commit 0d87488

Please sign in to comment.