diff --git a/.docker/php53/Dockerfile b/.docker/php53/Dockerfile index 38bf19a67..daa7b9214 100644 --- a/.docker/php53/Dockerfile +++ b/.docker/php53/Dockerfile @@ -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 # diff --git a/.docker/php54/Dockerfile b/.docker/php54/Dockerfile index b330bcdb0..62a792b9a 100644 --- a/.docker/php54/Dockerfile +++ b/.docker/php54/Dockerfile @@ -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 \ '; \ @@ -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 \ diff --git a/.docker/php55_71/Dockerfile b/.docker/php55_71/Dockerfile index 9438ad49f..d2e7151cd 100644 --- a/.docker/php55_71/Dockerfile +++ b/.docker/php55_71/Dockerfile @@ -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 \ '; \ @@ -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 \ diff --git a/.docker/php72_73/Dockerfile b/.docker/php72_73/Dockerfile index 8e8864668..fad3d7217 100644 --- a/.docker/php72_73/Dockerfile +++ b/.docker/php72_73/Dockerfile @@ -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 \ '; \ @@ -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 \ diff --git a/.docker/php74_83/Dockerfile b/.docker/php74_83/Dockerfile index 8e134233d..3a006bba9 100644 --- a/.docker/php74_83/Dockerfile +++ b/.docker/php74_83/Dockerfile @@ -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 \ '; \ @@ -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 \