September, 2018

Docker CentOS6 php5.6

Montag, September 17th, 2018

Ein Dockerfile zum Bauen von PHP5.6 auf einem CentOS6 Image:

FROM centos:6
RUN yum -y groupinstall "Development Tools"
RUN yum -y --enablerepo=extras install epel-release
RUN yum install -y wget libxml2-devel libxml2 openssl-devel sqlite-devel bzip2-devel libcurl libcurl-devel libjpeg-turbo-devel openjpeg-libs openjpeg-devel libpng-devel libvpx-devel libxslt-devel net-snmp-devel readline-devel aspell-devel unixODBC-devel libicu-devel libc-client-devel freetype-devel libXpm-devel libpng-devel gmp gmp-devel libc-client libc-client-devel libmcrypt-devel libtidy libtidy-devel
RUN wget https://fossies.org/linux/misc/old/t1lib-5.1.2.tar.gz; tar -xzf t1lib-5.1.2.tar.gz; cd t1lib-5.1.2 && ./configure && make without_doc && make install
RUN git clone https://github.com/php/php-src.git
RUN cd php-src; git fetch origin PHP-5.6.38; git checkout -b php5.6 origin/PHP-5.6.38; echo 'LC_ALL="en_GB.utf8"' >> /etc/environment; export CXXFLAGS="-O3 -Os -s"; export CFLAGS="$CXXFLAGS"; ./buildconf --forcebuildconf --force && ./configure --disable-static --prefix=/opt/php-5.6 --with-config-file-path=/opt/php-5.6/etc --with-config-file-scan-dir=/opt/php-5.6/etc/conf.d --enable-bcmath=shared --enable-calendar --enable-exif=shared --enable-fpm --enable-intl=shared --enable-mbstring --enable-mysqlnd=shared --enable-ftp=shared --enable-opcache=shared --enable-pdo=shared --enable-shmop=shared --enable-soap=shared --enable-sockets=shared --enable-zip=shared --with-bz2=shared --with-curl=shared --with-freetype-dir=/usr --with-gettext=shared,/usr --with-gmp=shared --with-imap=shared --with-imap-ssl --with-jpeg-dir=/usr --with-kerberos --with-ldap-libs=/usr/lib/x86_64-linux-gnu --with-libxml-dir=/usr --with-mcrypt=shared,/usr --with-mhash=shared,/usr --with-mysql=shared,mysqlnd --with-mysqli=shared,mysqlnd --with-mysql-sock=/var/run/mysqld/mysqld.sock --with-openssl --with-openssl-dir=/usr --with-pdo-mysql=shared,mysqlnd --with-pdo-sqlite=shared,/usr --with-png-dir=/usr --with-sqlite3=shared,/usr --with-t1lib=/usr --with-tidy=shared --with-xpm-dir=/usr --with-xsl=shared,/usr --with-zlib --with-zlib-dir=/usr --with-libdir=lib64 && make && make install