Bladeren bron

Update docker file for php 32bit tests (#8116)

Paul Yang 4 jaren geleden
bovenliggende
commit
70531697bc
1 gewijzigde bestanden met toevoegingen van 50 en 78 verwijderingen
  1. 50 78
      kokoro/linux/dockerfile/test/php_32bit/Dockerfile

+ 50 - 78
kokoro/linux/dockerfile/test/php_32bit/Dockerfile

@@ -53,78 +53,28 @@ RUN mv composer.phar /usr/local/bin/composer
 # Download php source code
 RUN git clone https://github.com/php/php-src
 
-# php 5.5
-RUN cd php-src \
-  && git checkout PHP-5.5.38 \
-  && ./buildconf --force
-RUN cd php-src \
-  && ./configure \
-  --enable-bcmath \
-  --with-openssl \
-  --with-zlib \
-  --prefix=/usr/local/php-5.5 \
-  && make \
-  && make install \
-  && make clean
-RUN cd php-src \
-  && ./configure \
-  --enable-maintainer-zts \
-  --with-openssl \
-  --with-zlib \
-  --prefix=/usr/local/php-5.5-zts \
-  && make \
-  && make install \
-  && make clean
-
-RUN wget -O phpunit https://phar.phpunit.de/phpunit-4.phar \
-  && chmod +x phpunit \
-  && cp phpunit /usr/local/php-5.5/bin \
-  && mv phpunit /usr/local/php-5.5-zts/bin
-
-# php 5.6
-RUN cd php-src \
-  && git checkout PHP-5.6.39 \
-  && ./buildconf --force
-RUN cd php-src \
-  && ./configure \
-  --enable-bcmath \
-  --with-openssl \
-  --with-zlib \
-  --prefix=/usr/local/php-5.6 \
-  && make \
-  && make install \
-  && make clean
-RUN cd php-src \
-  && ./configure \
-  --enable-maintainer-zts \
-  --with-openssl \
-  --with-zlib \
-  --prefix=/usr/local/php-5.6-zts \
-  && make \
-  && make install \
-  && make clean
+# php 7.0
+RUN wget https://github.com/php/php-src/archive/php-7.0.33.tar.gz -O /var/local/php-7.0.33.tar.gz
 
-RUN wget -O phpunit https://phar.phpunit.de/phpunit-5.phar \
-  && chmod +x phpunit \
-  && cp phpunit /usr/local/php-5.6/bin \
-  && mv phpunit /usr/local/php-5.6-zts/bin
+RUN cd /var/local \
+  && tar -zxvf php-7.0.33.tar.gz
 
-# php 7.0
-RUN cd php-src \
-  && git checkout PHP-7.0.33 \
-  && ./buildconf --force
-RUN cd php-src \
+RUN cd /var/local/php-src-php-7.0.33 \
+  && ./buildconf --force \
   && ./configure \
   --enable-bcmath \
+  --enable-mbstring \
   --with-openssl \
   --with-zlib \
   --prefix=/usr/local/php-7.0 \
   && make \
   && make install \
   && make clean
-RUN cd php-src \
+RUN cd /var/local/php-src-php-7.0.33 \
+  && ./buildconf --force \
   && ./configure \
   --enable-maintainer-zts \
+  --enable-mbstring \
   --with-openssl \
   --with-zlib \
   --prefix=/usr/local/php-7.0-zts \
@@ -138,21 +88,27 @@ RUN wget -O phpunit https://phar.phpunit.de/phpunit-6.phar \
   && mv phpunit /usr/local/php-7.0-zts/bin
 
 # php 7.1
-RUN cd php-src \
-  && git checkout PHP-7.1.25 \
-  && ./buildconf --force
-RUN cd php-src \
+RUN wget https://github.com/php/php-src/archive/php-7.1.25.tar.gz -O /var/local/php-7.1.25.tar.gz
+
+RUN cd /var/local \
+  && tar -zxvf php-7.1.25.tar.gz
+
+RUN cd /var/local/php-src-php-7.1.25 \
+  && ./buildconf --force \
   && ./configure \
   --enable-bcmath \
+  --enable-mbstring \
   --with-openssl \
   --with-zlib \
   --prefix=/usr/local/php-7.1 \
   && make \
   && make install \
   && make clean
-RUN cd php-src \
+RUN cd /var/local/php-src-php-7.1.25 \
+  && ./buildconf --force \
   && ./configure \
   --enable-maintainer-zts \
+  --enable-mbstring \
   --with-openssl \
   --with-zlib \
   --prefix=/usr/local/php-7.1-zts \
@@ -160,27 +116,33 @@ RUN cd php-src \
   && make install \
   && make clean
 
-RUN wget -O phpunit https://phar.phpunit.de/phpunit-7.phar \
+RUN wget -O phpunit https://phar.phpunit.de/phpunit-7.5.0.phar \
   && chmod +x phpunit \
   && cp phpunit /usr/local/php-7.1/bin \
   && mv phpunit /usr/local/php-7.1-zts/bin
 
 # php 7.2
-RUN cd php-src \
-  && git checkout PHP-7.2.13 \
-  && ./buildconf --force
-RUN cd php-src \
+RUN wget https://github.com/php/php-src/archive/php-7.2.13.tar.gz -O /var/local/php-7.2.13.tar.gz
+
+RUN cd /var/local \
+  && tar -zxvf php-7.2.13.tar.gz
+
+RUN cd /var/local/php-src-php-7.2.13 \
+  && ./buildconf --force \
   && ./configure \
   --enable-bcmath \
+  --enable-mbstring \
   --with-openssl \
   --with-zlib \
   --prefix=/usr/local/php-7.2 \
   && make \
   && make install \
   && make clean
-RUN cd php-src \
+RUN cd /var/local/php-src-php-7.2.13 \
+  && ./buildconf --force \
   && ./configure \
   --enable-maintainer-zts \
+  --enable-mbstring \
   --with-openssl \
   --with-zlib \
   --prefix=/usr/local/php-7.2-zts \
@@ -188,27 +150,33 @@ RUN cd php-src \
   && make install \
   && make clean
 
-RUN wget -O phpunit https://phar.phpunit.de/phpunit-7.phar \
+RUN wget -O phpunit https://phar.phpunit.de/phpunit-7.5.0.phar \
   && chmod +x phpunit \
   && cp phpunit /usr/local/php-7.2/bin \
   && mv phpunit /usr/local/php-7.2-zts/bin
 
 # php 7.3
-RUN cd php-src \
-  && git checkout PHP-7.3.0 \
-  && ./buildconf --force
-RUN cd php-src \
+RUN wget https://github.com/php/php-src/archive/php-7.3.0.tar.gz -O /var/local/php-7.3.0.tar.gz
+
+RUN cd /var/local \
+  && tar -zxvf php-7.3.0.tar.gz
+
+RUN cd /var/local/php-src-php-7.3.0 \
+  && ./buildconf --force \
   && ./configure \
   --enable-bcmath \
+  --enable-mbstring \
   --with-openssl \
   --with-zlib \
   --prefix=/usr/local/php-7.3 \
   && make \
   && make install \
   && make clean
-RUN cd php-src \
+RUN cd /var/local/php-src-php-7.3.0 \
+  && ./buildconf --force \
   && ./configure \
   --enable-maintainer-zts \
+  --enable-mbstring \
   --with-openssl \
   --with-zlib \
   --prefix=/usr/local/php-7.3-zts \
@@ -216,7 +184,7 @@ RUN cd php-src \
   && make install \
   && make clean
 
-RUN wget -O phpunit https://phar.phpunit.de/phpunit-7.phar \
+RUN wget -O phpunit https://phar.phpunit.de/phpunit-7.5.0.phar \
   && chmod +x phpunit \
   && cp phpunit /usr/local/php-7.3/bin \
   && mv phpunit /usr/local/php-7.3-zts/bin
@@ -239,6 +207,8 @@ RUN cd /var/local/php-src-php-7.4.0 \
   && ./buildconf --force \
   && ./configure \
   --enable-bcmath \
+  --enable-mbstring \
+  --disable-mbregex \
   --with-openssl \
   --with-zlib \
   --prefix=/usr/local/php-7.4 \
@@ -249,6 +219,8 @@ RUN cd /var/local/php-src-php-7.4.0 \
   && ./buildconf --force \
   && ./configure \
   --enable-maintainer-zts \
+  --enable-mbstring \
+  --disable-mbregex \
   --with-openssl \
   --with-zlib \
   --prefix=/usr/local/php-7.4-zts \