|
| 1 | +FROM debian:jessie |
| 2 | +ENV DEBIAN_FRONTEND noninteractive |
| 3 | + |
| 4 | +RUN apt-get --assume-yes --quiet update |
| 5 | + |
| 6 | +RUN apt-get --assume-yes --quiet install \ |
| 7 | + curl \ |
| 8 | + rsync \ |
| 9 | + # "/bin/sh: 1: make: not found" |
| 10 | + make \ |
| 11 | + # "make[1]: *** No rule to make target '../include/openssl/bio.h', needed by 'cryptlib.o'. Stop." |
| 12 | + # "configure: error: xml2-config not found. Please check your libxml2 installation." |
| 13 | + libxml2-dev \ |
| 14 | + # "make[1]: gcc: Command not found" |
| 15 | + gcc \ |
| 16 | + # tar (child): xz: Cannot exec: No such file or directory |
| 17 | + # tar (child): Error is not recoverable: exiting now |
| 18 | + # tar: Child returned status 2 |
| 19 | + # tar: Error is not recoverable: exiting now |
| 20 | + xz-utils \ |
| 21 | + # "configure: error: Cannot find libz" |
| 22 | + libssl-dev \ |
| 23 | + # "configure: error: Please reinstall the libcurl distribution - |
| 24 | + # easy.h should be in <curl-dir>/include/curl/" |
| 25 | + libcurl4-openssl-dev \ |
| 26 | + # "configure: error: png.h not found." |
| 27 | + libpng-dev \ |
| 28 | + # "sh: 1: git: not found" (composer). |
| 29 | + git \ |
| 30 | + # "Failed to download phpunit/phpunit from dist: The zip extension and unzip command are both missing, |
| 31 | + # skipping." |
| 32 | + zip |
| 33 | + |
| 34 | +# Compile openssl so that php configure --with-openssl works. |
| 35 | +RUN mkdir --parents "/tmp/openssl/" && \ |
| 36 | + curl --silent --show-error --output "openssl.tar.gz" \ |
| 37 | + "https://www.openssl.org/source/openssl-1.0.2k.tar.gz" && \ |
| 38 | + tar --extract --file "openssl.tar.gz" --directory "/tmp/openssl/" --strip-components="1" && \ |
| 39 | + cd "/tmp/openssl/" && \ |
| 40 | + ./config && \ |
| 41 | + make && \ |
| 42 | + make install && \ |
| 43 | + rm -rf "/tmp/openssl/" |
| 44 | + |
| 45 | +RUN mkdir --parents "/usr/src/php/" && \ |
| 46 | + curl --silent --show-error --output "php.tar.xz" \ |
| 47 | + "https://secure.php.net/distributions/php-5.3.29.tar.xz" && \ |
| 48 | + tar --extract --file "php.tar.xz" --directory "/usr/src/php/" --strip-components="1" && \ |
| 49 | + rm "php.tar.xz"* && \ |
| 50 | + cd "/usr/src/php/" && \ |
| 51 | + ./configure \ |
| 52 | + --enable-mbstring \ |
| 53 | + --with-curl \ |
| 54 | + --with-gd \ |
| 55 | + --with-openssl="/usr/local/ssl" \ |
| 56 | + --with-zlib && \ |
| 57 | + make --jobs="$(nproc)" && \ |
| 58 | + make install && \ |
| 59 | + make clean |
| 60 | + |
| 61 | +RUN curl --silent --show-error "https://getcomposer.org/installer" | php && \ |
| 62 | + mv "composer.phar" "/usr/local/bin/composer" && \ |
| 63 | + composer global require --no-interaction "phpunit/phpunit" |
| 64 | + |
| 65 | +ENV PATH /root/.composer/vendor/bin:$PATH |
| 66 | +CMD ["bash"] |
0 commit comments