diff --git a/.travis.yml b/.travis.yml index 487f47ae..4e151a41 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,6 +23,7 @@ env: # DOCKER_PASSWORD - secure: "ZRrVOVOkSCS2UxEi1HNF1iKefK4sDT/sPRl1HxMQjLnRRaAMdG0aRnBwQf2YAM2qzhCfN85qt6zZtC4awc2mHiZ88JrAZxBjK6xj4BwOyLbDuzpBsKXnx8Nix+wyYYKSjsC3LOYrsUe+4rvkw3tVvVaX8G2llojwdksF34VDmmHBmzCG/Bsexk7UqC+qw0PZm7BtctQO+IL0btmMDijRDElxfR+AuPvf9JdkhYzw9TOO7Jqd53NssNVGyL+XSV0dfGn8PkZTp1e8D+28pLK4oGVog+Wk7Cq94hSGjk5AkWKvL5441rupG1AA8K3njeDNMKdov4o+dmnkAH7Jh8tjShMhNhoxHce3IzpczjhoE1EyYQcyPf1qdfhV35Xv096iWX5809pp1MZF2oE5eism8JaU9NpGClryVbKVKtup8ko9/tCqz01Czq5Vue40feMkGtdePulg59OhyyPLYldsObw8QlZydkrmgVZe6b+GyybeiHraTfDq4pvTgUrC4Cmm5J3IB5Ig1THEiYKHfRJ5hSSMDDODeBXc8Xh6mFssEVshNx/jbUQWuAVYQFw/GIquVHxr6btbevrWIoD+zmqcc0L98u9pYH8w7b+gMgVJNCC4QQz2NCGGWw9l9/TmLrKJgeXbG18n8D314le1zuna6/VfH9pXIlbNO4hgz5NLHJk=" matrix: + - PHP=5.3 - PHP=5.4 - PHP=5.5 - PHP=5.6 diff --git a/Dockerfiles/base/Dockerfile-5.3 b/Dockerfiles/base/Dockerfile-5.3 new file mode 100644 index 00000000..e45ea960 --- /dev/null +++ b/Dockerfiles/base/Dockerfile-5.3 @@ -0,0 +1,85 @@ +# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-base.j2 instead. +FROM devilbox/php-fpm-5.3 +MAINTAINER "cytopia" + + +### +### Labels +### +LABEL \ + name="cytopia's PHP-FPM 5.3 Image" \ + image="devilbox/php-fpm" \ + tag="5.3-base" \ + vendor="devilbox" \ + license="MIT" + + +### +### Envs +### +ENV MY_USER="devilbox" \ + MY_GROUP="devilbox" \ + MY_UID="1000" \ + MY_GID="1000" + + +### +### User/Group +### +RUN set -x \ + && groupadd -g ${MY_GID} -r ${MY_GROUP} \ + && useradd -u ${MY_UID} -m -s /bin/bash -g ${MY_GROUP} ${MY_USER} + + +### +### Upgrade (install ps) +### +RUN set -x \ + && apt-get update \ + && apt-get upgrade -y \ + && apt-get install --no-install-recommends --no-install-suggests -y procps \ + && rm -rf /var/lib/apt/lists/* + + +### +### Configure +### +RUN set -x \ + && rm -rf /usr/local/etc/php-fpm.d \ + && mkdir -p /usr/local/etc/php-fpm.d \ + && mkdir -p /var/lib/php/session \ + && mkdir -p /var/lib/php/wsdlcache \ + && chown -R devilbox:devilbox /var/lib/php/session \ + && chown -R devilbox:devilbox /var/lib/php/wsdlcache + + +### +### Copy files +### +COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh +COPY ./data/docker-entrypoint.d /docker-entrypoint.d +COPY ./data/php-fpm.conf /usr/local/etc/php-fpm.conf +COPY ./data/php-fpm.d /usr/local/etc/php-fpm.d +COPY ./data/php-fpm.d-docker-5.3.conf /usr/local/etc/php-fpm.d/docker.conf + + +### +### Verify +### +RUN set -x \ + && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.3' \ + && /usr/local/sbin/php-fpm --test \ + && PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi + + +### +### Ports +### +EXPOSE 9000 + + +### +### Entrypoint +### +ENTRYPOINT ["/docker-entrypoint.sh"] diff --git a/Dockerfiles/base/data/php-fpm.d-docker-5.3.conf b/Dockerfiles/base/data/php-fpm.d-docker-5.3.conf new file mode 100644 index 00000000..3e5b3fc0 --- /dev/null +++ b/Dockerfiles/base/data/php-fpm.d-docker-5.3.conf @@ -0,0 +1,10 @@ +[www] +; Keep env variables set by docker +;clear_env = no + +; Redirect worker stdout and stderr into main error log. If not set, stdout and +; stderr will be redirected to /dev/null according to FastCGI specs. +; Note: on highloaded environement, this can cause some delay in the page +; process time (several ms). +; Default Value: no +catch_workers_output = yes diff --git a/Dockerfiles/mods/Dockerfile-5.3 b/Dockerfiles/mods/Dockerfile-5.3 new file mode 100644 index 00000000..c97cd8c9 --- /dev/null +++ b/Dockerfiles/mods/Dockerfile-5.3 @@ -0,0 +1,404 @@ +# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-mods.j2 instead. +FROM devilbox/php-fpm:5.3-base +MAINTAINER "cytopia" + + +### +### Labels +### +LABEL \ + name="cytopia's PHP-FPM 5.3 Image" \ + image="devilbox/php-fpm" \ + tag="5.3-mods" \ + vendor="devilbox" \ + license="MIT" + + +### +### Envs +### +ENV BUILD_DEPS \ + librabbitmq-dev \ + libbz2-dev \ + libcurl4-openssl-dev \ + libxml2-dev \ + libenchant-dev \ + libssl-dev \ + libpng-dev \ + libjpeg-dev \ + libxpm-dev \ + libvpx-dev \ + zlib1g-dev \ + libfreetype6-dev \ + libgmp-dev \ + libmagickwand-dev \ + libc-client-dev \ + libkrb5-dev \ + libcurl4-openssl-dev \ + libfbclient2 \ + libib-util \ + firebird-dev \ + libicu-dev \ + libldap2-dev \ + libsasl2-dev \ + libmcrypt-dev \ + zlib1g-dev \ + zlib1g-dev \ + libmemcached-dev \ + libssl-dev \ + libsasl2-dev \ + libssl-dev \ + libsasl2-dev \ + freetds-dev \ + libfbclient2 \ + libib-util \ + firebird-dev \ + zlib1g-dev \ + libpq-dev \ + libsqlite3-dev \ + libpq-dev \ + libssl-dev \ + libpspell-dev \ + librecode-dev \ + libmm-dev \ + libxml2-dev \ + libssl-dev \ + libsnmp-dev \ + snmp \ + libxml2-dev \ + libnghttp2-dev \ + libssl-dev \ + libtidy-dev \ + libxml2-dev \ + libxml2-dev \ + libxml2-dev \ + libxml2-dev \ + libxml2-dev \ + libxslt-dev \ + zlib1g-dev \ + ca-certificates \ + git + +ENV RUN_DEPS \ + librabbitmq1 \ + libenchant1c2a \ + libpng12-0 \ + libjpeg62-turbo \ + libxpm4 \ + libvpx1 \ + libfreetype6 \ + libmagickwand-6.q16-2 \ + libc-client2007e \ + libfbclient2 \ + libicu52 \ + libmcrypt4 \ + libmemcachedutil2 \ + libmysqlclient18 \ + libsybdb5 \ + libfbclient2 \ + libpq5 \ + libpq5 \ + libaspell15 \ + librecode0 \ + snmp \ + libnghttp2-5 \ + libtidy-0.99-0 \ + libxslt1.1 \ + ca-certificates + + +### +### Install +### +RUN set -x \ + && apt-get update \ + && apt-get install --no-install-recommends --no-install-suggests -y \ + ${BUILD_DEPS} \ + \ + \ + && echo "/usr" | pecl install amqp \ + && docker-php-ext-enable amqp \ + && pecl install apcu-4.0.11 \ + && docker-php-ext-enable apcu \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) bcmath \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) bz2 \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) calendar \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) ctype \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) curl \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) dba \ + && /usr/local/bin/docker-php-ext-configure dom --with-libxml-dir=/usr \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) dom \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) enchant \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) exif \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) fileinfo \ + && /usr/local/bin/docker-php-ext-configure ftp --with-openssl-dir \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) ftp \ + && ln -s /usr/lib/x86_64-linux-gnu/libXpm.* /usr/lib/ && mkdir /usr/include/freetype2/freetype && ln -s /usr/include/freetype2/freetype.h /usr/include/freetype2/freetype/freetype.h \ + && /usr/local/bin/docker-php-ext-configure gd --with-gd --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --enable-gd-jis-conv --enable-gd-native-ttf \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gd \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gettext \ + && ln /usr/include/x86_64-linux-gnu/gmp.h /usr/include/ \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gmp \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) hash \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) iconv \ + && pecl install igbinary \ + && docker-php-ext-enable igbinary \ + && pecl install imagick-3.3.0 \ + && docker-php-ext-enable imagick \ + && ln -s /usr/lib/x86_64-linux-gnu/libkrb5* /usr/lib/ \ + && /usr/local/bin/docker-php-ext-configure imap --with-kerberos --with-imap-ssl --with-imap \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) imap \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) interbase \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) intl \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) json \ + && ln -s /usr/lib/x86_64-linux-gnu/libldap* /usr/lib/ \ + && /usr/local/bin/docker-php-ext-configure ldap --with-ldap --with-ldap-sasl \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) ldap \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mbstring \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mcrypt \ + && pecl install memcache \ + && docker-php-ext-enable memcache \ + && pecl install memcached-2.2.0 \ + && docker-php-ext-enable memcached \ + && yes | pecl install mongo \ + && docker-php-ext-enable mongo \ + && pecl install mongodb-0.6.3 \ + && docker-php-ext-enable mongodb \ + && pecl install msgpack-0.5.7 \ + && docker-php-ext-enable msgpack \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mysql \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mysqli \ + && pecl install zendopcache \ + && docker-php-ext-enable opcache \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pcntl \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo \ + && ln -s /usr/lib/x86_64-linux-gnu/libsybdb.* /usr/lib/ \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_dblib \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_firebird \ + && /usr/local/bin/docker-php-ext-configure pdo_mysql --with-zlib-dir=/usr \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_mysql \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_pgsql \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pdo_sqlite \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pgsql \ + && git clone -v https://github.com/phalcon/cphalcon /tmp/phalcon \ + && cd /tmp/phalcon \ + && git checkout phalcon-v2.0.9 \ + && cd build && ./install \ + && docker-php-ext-enable phalcon \ + && cd / && rm -rf /tmp/phalcon \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) phar \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) posix \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) pspell \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) recode \ + && pecl install redis \ + && docker-php-ext-enable redis \ + && /usr/local/bin/docker-php-ext-configure session --with-mm \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) session \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) shmop \ + && /usr/local/bin/docker-php-ext-configure simplexml --with-libxml-dir=/usr \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) simplexml \ + && /usr/local/bin/docker-php-ext-configure snmp --with-openssl-dir \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) snmp \ + && /usr/local/bin/docker-php-ext-configure soap --with-libxml-dir=/usr \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) soap \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sockets \ + && pecl install swoole-1.9.23 \ + && docker-php-ext-enable swoole \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvmsg \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvsem \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sysvshm \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) tidy \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) tokenizer \ + && pecl install uploadprogress \ + && docker-php-ext-enable uploadprogress \ + && /usr/local/bin/docker-php-ext-configure wddx --with-libxml-dir=/usr \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) wddx \ + && pecl install xdebug-2.2.7 \ + && docker-php-ext-enable xdebug \ + && /usr/local/bin/docker-php-ext-configure xml --with-libxml-dir=/usr \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xml \ + && /usr/local/bin/docker-php-ext-configure xmlreader --with-libxml-dir=/usr \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xmlreader \ + && /usr/local/bin/docker-php-ext-configure xmlrpc --with-libxml-dir=/usr --with-iconv-dir=/usr \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xmlrpc \ + && /usr/local/bin/docker-php-ext-configure xmlwriter --with-libxml-dir=/usr \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xmlwriter \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) xsl \ + && /usr/local/bin/docker-php-ext-configure zip --with-zlib-dir=/usr --with-pcre-dir=/usr \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) zip \ + \ + \ + && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \ + ${BUILD_DEPS} \ + \ + \ + && apt-get install --no-install-recommends --no-install-suggests -y \ + ${RUN_DEPS} \ + && rm -rf /var/lib/apt/lists/* \ + && update-ca-certificates \ + && sh -c "find /usr/local -type f -perm /u+x -exec strip --strip-all '{}' + || true" + + +### +### Verify +### +RUN set -x \ + && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.3' \ + && /usr/local/sbin/php-fpm --test \ + && PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi + +RUN set -x \ + && php -m | grep -oiE '^amqp$' \ + && php-fpm -m | grep -oiE '^amqp$' \ + && php -m | grep -oiE '^apcu$' \ + && php-fpm -m | grep -oiE '^apcu$' \ + && php -m | grep -oiE '^bcmath$' \ + && php-fpm -m | grep -oiE '^bcmath$' \ + && php -m | grep -oiE '^bz2$' \ + && php-fpm -m | grep -oiE '^bz2$' \ + && php -m | grep -oiE '^calendar$' \ + && php-fpm -m | grep -oiE '^calendar$' \ + && php -m | grep -oiE '^ctype$' \ + && php-fpm -m | grep -oiE '^ctype$' \ + && php -m | grep -oiE '^curl$' \ + && php-fpm -m | grep -oiE '^curl$' \ + && php -m | grep -oiE '^dba$' \ + && php-fpm -m | grep -oiE '^dba$' \ + && php -m | grep -oiE '^dom$' \ + && php-fpm -m | grep -oiE '^dom$' \ + && php -m | grep -oiE '^enchant$' \ + && php-fpm -m | grep -oiE '^enchant$' \ + && php -m | grep -oiE '^exif$' \ + && php-fpm -m | grep -oiE '^exif$' \ + && php -m | grep -oiE '^fileinfo$' \ + && php-fpm -m | grep -oiE '^fileinfo$' \ + && php -m | grep -oiE '^ftp$' \ + && php-fpm -m | grep -oiE '^ftp$' \ + && php -m | grep -oiE '^gd$' \ + && php-fpm -m | grep -oiE '^gd$' \ + && php -m | grep -oiE '^gettext$' \ + && php-fpm -m | grep -oiE '^gettext$' \ + && php -m | grep -oiE '^gmp$' \ + && php-fpm -m | grep -oiE '^gmp$' \ + && php -m | grep -oiE '^hash$' \ + && php-fpm -m | grep -oiE '^hash$' \ + && php -m | grep -oiE '^iconv$' \ + && php-fpm -m | grep -oiE '^iconv$' \ + && php -m | grep -oiE '^igbinary$' \ + && php-fpm -m | grep -oiE '^igbinary$' \ + && php -m | grep -oiE '^imagick$' \ + && php-fpm -m | grep -oiE '^imagick$' \ + && php -m | grep -oiE '^imap$' \ + && php-fpm -m | grep -oiE '^imap$' \ + && php -m | grep -oiE '^interbase$' \ + && php-fpm -m | grep -oiE '^interbase$' \ + && php -m | grep -oiE '^intl$' \ + && php-fpm -m | grep -oiE '^intl$' \ + && php -m | grep -oiE '^json$' \ + && php-fpm -m | grep -oiE '^json$' \ + && php -m | grep -oiE '^ldap$' \ + && php-fpm -m | grep -oiE '^ldap$' \ + && php -m | grep -oiE '^mbstring$' \ + && php-fpm -m | grep -oiE '^mbstring$' \ + && php -m | grep -oiE '^mcrypt$' \ + && php-fpm -m | grep -oiE '^mcrypt$' \ + && php -m | grep -oiE '^memcache$' \ + && php-fpm -m | grep -oiE '^memcache$' \ + && php -m | grep -oiE '^memcached$' \ + && php-fpm -m | grep -oiE '^memcached$' \ + && php -m | grep -oiE '^mongo$' \ + && php-fpm -m | grep -oiE '^mongo$' \ + && php -m | grep -oiE '^mongodb$' \ + && php-fpm -m | grep -oiE '^mongodb$' \ + && php -m | grep -oiE '^msgpack$' \ + && php-fpm -m | grep -oiE '^msgpack$' \ + && php -m | grep -oiE '^mysql$' \ + && php-fpm -m | grep -oiE '^mysql$' \ + && php -m | grep -oiE '^mysqli$' \ + && php-fpm -m | grep -oiE '^mysqli$' \ + && php -m | grep -oiE '^Zend Opcache$' \ + && php-fpm -m | grep -oiE '^Zend Opcache$' \ + && php -m | grep -oiE '^pcntl$' \ + && php-fpm -m | grep -oiE '^pcntl$' \ + && php -m | grep -oiE '^pdo$' \ + && php-fpm -m | grep -oiE '^pdo$' \ + && php -m | grep -oiE '^pdo_dblib$' \ + && php-fpm -m | grep -oiE '^pdo_dblib$' \ + && php -m | grep -oiE '^pdo_firebird$' \ + && php-fpm -m | grep -oiE '^pdo_firebird$' \ + && php -m | grep -oiE '^pdo_mysql$' \ + && php-fpm -m | grep -oiE '^pdo_mysql$' \ + && php -m | grep -oiE '^pdo_pgsql$' \ + && php-fpm -m | grep -oiE '^pdo_pgsql$' \ + && php -m | grep -oiE '^pdo_sqlite$' \ + && php-fpm -m | grep -oiE '^pdo_sqlite$' \ + && php -m | grep -oiE '^pgsql$' \ + && php-fpm -m | grep -oiE '^pgsql$' \ + && php -m | grep -oiE '^phalcon$' \ + && php-fpm -m | grep -oiE '^phalcon$' \ + && php -m | grep -oiE '^phar$' \ + && php-fpm -m | grep -oiE '^phar$' \ + && php -m | grep -oiE '^posix$' \ + && php-fpm -m | grep -oiE '^posix$' \ + && php -m | grep -oiE '^pspell$' \ + && php-fpm -m | grep -oiE '^pspell$' \ + && php -m | grep -oiE '^recode$' \ + && php-fpm -m | grep -oiE '^recode$' \ + && php -m | grep -oiE '^redis$' \ + && php-fpm -m | grep -oiE '^redis$' \ + && php -m | grep -oiE '^session$' \ + && php-fpm -m | grep -oiE '^session$' \ + && php -m | grep -oiE '^shmop$' \ + && php-fpm -m | grep -oiE '^shmop$' \ + && php -m | grep -oiE '^simplexml$' \ + && php-fpm -m | grep -oiE '^simplexml$' \ + && php -m | grep -oiE '^snmp$' \ + && php-fpm -m | grep -oiE '^snmp$' \ + && php -m | grep -oiE '^soap$' \ + && php-fpm -m | grep -oiE '^soap$' \ + && php -m | grep -oiE '^sockets$' \ + && php-fpm -m | grep -oiE '^sockets$' \ + && php -m | grep -oiE '^swoole$' \ + && php-fpm -m | grep -oiE '^swoole$' \ + && php -m | grep -oiE '^sysvmsg$' \ + && php-fpm -m | grep -oiE '^sysvmsg$' \ + && php -m | grep -oiE '^sysvsem$' \ + && php-fpm -m | grep -oiE '^sysvsem$' \ + && php -m | grep -oiE '^sysvshm$' \ + && php-fpm -m | grep -oiE '^sysvshm$' \ + && php -m | grep -oiE '^tidy$' \ + && php-fpm -m | grep -oiE '^tidy$' \ + && php -m | grep -oiE '^tokenizer$' \ + && php-fpm -m | grep -oiE '^tokenizer$' \ + && php -m | grep -oiE '^uploadprogress$' \ + && php-fpm -m | grep -oiE '^uploadprogress$' \ + && php -m | grep -oiE '^wddx$' \ + && php-fpm -m | grep -oiE '^wddx$' \ + && php -m | grep -oiE '^xdebug$' \ + && php-fpm -m | grep -oiE '^xdebug$' \ + && php -m | grep -oiE '^xml$' \ + && php-fpm -m | grep -oiE '^xml$' \ + && php -m | grep -oiE '^xmlreader$' \ + && php-fpm -m | grep -oiE '^xmlreader$' \ + && php -m | grep -oiE '^xmlrpc$' \ + && php-fpm -m | grep -oiE '^xmlrpc$' \ + && php -m | grep -oiE '^xmlwriter$' \ + && php-fpm -m | grep -oiE '^xmlwriter$' \ + && php -m | grep -oiE '^xsl$' \ + && php-fpm -m | grep -oiE '^xsl$' \ + && php -m | grep -oiE '^zip$' \ + && php-fpm -m | grep -oiE '^zip$' \ + && true + + +### +### Ports +### +EXPOSE 9000 + + +### +### Entrypoint +### +ENTRYPOINT ["/docker-entrypoint.sh"] diff --git a/Dockerfiles/mods/Dockerfile-5.4 b/Dockerfiles/mods/Dockerfile-5.4 index 34f259dd..c6952c9a 100644 --- a/Dockerfiles/mods/Dockerfile-5.4 +++ b/Dockerfiles/mods/Dockerfile-5.4 @@ -48,6 +48,7 @@ ENV BUILD_DEPS \ libssl-dev \ libsasl2-dev \ libssl-dev \ + libsasl2-dev \ freetds-dev \ libfbclient2 \ libib-util \ @@ -92,6 +93,7 @@ ENV RUN_DEPS \ libicu52 \ libmcrypt4 \ libmemcachedutil2 \ + libmysqlclient18 \ libsybdb5 \ libfbclient2 \ libpq5 \ diff --git a/Dockerfiles/mods/Dockerfile-5.5 b/Dockerfiles/mods/Dockerfile-5.5 index ca887618..d5a734bb 100644 --- a/Dockerfiles/mods/Dockerfile-5.5 +++ b/Dockerfiles/mods/Dockerfile-5.5 @@ -48,6 +48,7 @@ ENV BUILD_DEPS \ libssl-dev \ libsasl2-dev \ libssl-dev \ + libsasl2-dev \ freetds-dev \ libfbclient2 \ libib-util \ @@ -94,6 +95,7 @@ ENV RUN_DEPS \ libicu52 \ libmcrypt4 \ libmemcachedutil2 \ + libmysqlclient18 \ libsybdb5 \ libfbclient2 \ libpq5 \ diff --git a/Dockerfiles/mods/Dockerfile-5.6 b/Dockerfiles/mods/Dockerfile-5.6 index 9a95f920..ad01cf87 100644 --- a/Dockerfiles/mods/Dockerfile-5.6 +++ b/Dockerfiles/mods/Dockerfile-5.6 @@ -48,6 +48,7 @@ ENV BUILD_DEPS \ libssl-dev \ libsasl2-dev \ libssl-dev \ + libsasl2-dev \ freetds-dev \ libfbclient2 \ libib-util \ @@ -95,6 +96,7 @@ ENV RUN_DEPS \ libicu52 \ libmcrypt4 \ libmemcachedutil2 \ + libmysqlclient18 \ libsybdb5 \ libfbclient2 \ libpq5 \ diff --git a/Dockerfiles/mods/Dockerfile-7.0 b/Dockerfiles/mods/Dockerfile-7.0 index 196b3506..5bdf96ba 100644 --- a/Dockerfiles/mods/Dockerfile-7.0 +++ b/Dockerfiles/mods/Dockerfile-7.0 @@ -48,6 +48,7 @@ ENV BUILD_DEPS \ zlib1g-dev \ libmemcached-dev \ libssl-dev \ + libsasl2-dev \ freetds-dev \ libfbclient2 \ libib-util \ diff --git a/Dockerfiles/mods/Dockerfile-7.1 b/Dockerfiles/mods/Dockerfile-7.1 index 3a8f60c4..78e5723e 100644 --- a/Dockerfiles/mods/Dockerfile-7.1 +++ b/Dockerfiles/mods/Dockerfile-7.1 @@ -47,6 +47,7 @@ ENV BUILD_DEPS \ zlib1g-dev \ libmemcached-dev \ libssl-dev \ + libsasl2-dev \ freetds-dev \ libfbclient2 \ libib-util \ diff --git a/Dockerfiles/mods/Dockerfile-7.2 b/Dockerfiles/mods/Dockerfile-7.2 index b901b042..5b7d43fb 100644 --- a/Dockerfiles/mods/Dockerfile-7.2 +++ b/Dockerfiles/mods/Dockerfile-7.2 @@ -47,6 +47,7 @@ ENV BUILD_DEPS \ zlib1g-dev \ libmemcached-dev \ libssl-dev \ + libsasl2-dev \ freetds-dev \ libfbclient2 \ libib-util \ diff --git a/Dockerfiles/prod/Dockerfile-5.3 b/Dockerfiles/prod/Dockerfile-5.3 new file mode 100644 index 00000000..c518baa9 --- /dev/null +++ b/Dockerfiles/prod/Dockerfile-5.3 @@ -0,0 +1,77 @@ +# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-prod.j2 instead. +FROM devilbox/php-fpm:5.3-mods +MAINTAINER "cytopia" + + +### +### Labels +### +LABEL \ + name="cytopia's PHP-FPM 5.3 Image" \ + image="devilbox/php-fpm" \ + tag="5.3-prod" \ + vendor="devilbox" \ + license="MIT" + + +### +### Install +### +RUN set -x \ + && apt-get update \ + && DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --no-install-suggests -y \ + locales-all \ + postfix \ + postfix-pcre \ + rsyslog \ + socat \ + supervisor \ + && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \ + && rm -rf /var/lib/apt/lists/* \ + \ + && rm -rf /etc/supervisor* \ + && mkdir -p /etc/supervisor/conf.d \ + && mkdir -p /var/log/supervisor + + + +### +### Verify +### +RUN set -x \ + && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.3' \ + && /usr/local/sbin/php-fpm --test \ + && PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi + + +### +### Copy files +### +COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh +COPY ./data/docker-entrypoint.d/*.sh /docker-entrypoint.d/ +COPY ./data/postfix.sh /usr/local/sbin/postfix.sh +COPY ./data/supervisord.conf /etc/supervisor/supervisord.conf + + +### +### Volumes +### +VOLUME /etc/php-custom.d +VOLUME /etc/php-fpm-custom.d +VOLUME /etc/php-modules.d +VOLUME /var/log/php +VOLUME /var/mail + + + +### +### Ports +### +EXPOSE 9000 + + +### +### Entrypoint +### +ENTRYPOINT ["/docker-entrypoint.sh"] diff --git a/Dockerfiles/prod/data/docker-entrypoint.d/37-fix-php-5.3-env-vars.sh b/Dockerfiles/prod/data/docker-entrypoint.d/37-fix-php-5.3-env-vars.sh new file mode 100755 index 00000000..2221e707 --- /dev/null +++ b/Dockerfiles/prod/data/docker-entrypoint.d/37-fix-php-5.3-env-vars.sh @@ -0,0 +1,47 @@ +#!/usr/bin/env bash +# +# PHP FPM 5.3 does not allow to pass through environment variables +# This is a hacky shell script to create: +# env[NAME]='VALUE' entries for PHP FPM config out of all current env vars + + +# Check if an environment variable is valid +# for PHP-FPM config and if yes return it +_get_env_php_fpm() { + local name="${1}" + local env= + + # Not set + if ! printenv "${name}" >/dev/null 2>&1; then + return 1 + fi + + # Empty variables are not supported by PHP-FPM config syntax + env="$( printenv "${name}" )" + if [ -z "${env}" ]; then + return 1 + fi + + # Values containing a = are not supported by PHP-FPM config syntax + if echo "${env}" | grep -q '='; then + return 1 + fi + + echo "${env}" +} + +# Write all valid environment variables to a PHP-FPM config +set_env_php_fpm() { + local config="${1}" + + # Clear file + echo "[www]" > "${config}" + + # Append env variables + for name in $(printenv | awk -F'=' '{print $1}'); do + + if _get_env_php_fpm "${name}" >/dev/null 2>&1; then + echo "env[${name}]='$( _get_env_php_fpm "${name}" )'" >> "${config}" + fi + done +} diff --git a/Dockerfiles/prod/data/docker-entrypoint.sh b/Dockerfiles/prod/data/docker-entrypoint.sh index 130cdad3..15834bde 100755 --- a/Dockerfiles/prod/data/docker-entrypoint.sh +++ b/Dockerfiles/prod/data/docker-entrypoint.sh @@ -78,6 +78,14 @@ set_gid "NEW_GID" "${MY_GROUP}" "/home/${MY_USER}" "${DEBUG_LEVEL}" set_timezone "TIMEZONE" "${PHP_INI_DIR}" "${DEBUG_LEVEL}" +### +### PHP-FPM 5.3 Env variables +### +if php -v 2>/dev/null | grep -Eoq '^PHP[[:space:]]5\.3'; then + set_env_php_fpm "/usr/local/etc/php-fpm.d/env.conf" +fi + + ### ### Set Logging ### diff --git a/Dockerfiles/work/Dockerfile-5.3 b/Dockerfiles/work/Dockerfile-5.3 new file mode 100644 index 00000000..00ada803 --- /dev/null +++ b/Dockerfiles/work/Dockerfile-5.3 @@ -0,0 +1,315 @@ +# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-work.j2 instead. +FROM devilbox/php-fpm:5.3-prod +MAINTAINER "cytopia" + + +### +### Labels +### +LABEL \ + name="cytopia's PHP-FPM 5.3 Image" \ + image="devilbox/php-fpm" \ + tag="5.3-work" \ + vendor="devilbox" \ + license="MIT" + + +### +### Envs +### +ENV BASH_PROFILE=".bashrc" + + +### +### Install Tools +### +RUN set -x \ + && apt-get update \ + && apt-get install --no-install-recommends --no-install-suggests -y \ + dirmngr \ + gnupg \ + && echo "deb http://ftp.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/backports.list \ + && apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv A1715D88E1DF1F24 \ + && echo "deb http://ppa.launchpad.net/git-core/ppa/ubuntu wily main" > /etc/apt/sources.list.d/git.list \ + && apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5 \ + && echo "deb http://repo.mongodb.org/apt/debian jessie/mongodb-org/3.6 main" > /etc/apt/sources.list.d/mongo.list \ + && curl -q "https://deb.nodesource.com/gpgkey/nodesource.gpg.key" 2>/dev/null | apt-key add - \ + && echo "deb http://deb.nodesource.com/node_8.x jessie main" > /etc/apt/sources.list.d/node.list \ + && curl -q https://www.postgresql.org/media/keys/ACCC4CF8.asc 2>/dev/null | apt-key add - \ + && echo "deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main" > /etc/apt/sources.list.d/pgsql.list \ + && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \ + && echo "deb http://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list \ + && apt-get update \ + && apt-get install --no-install-recommends --no-install-suggests -y \ + ack-grep \ + aspell \ + autoconf \ + automake \ + bash-completion \ + bzip2 \ + coreutils \ + curl \ + dnsutils \ + dos2unix \ + file \ + gcc \ + git \ + git-flow \ + git-svn \ + hostname \ + htop \ + imagemagick \ + iputils-ping \ + less \ + libc-dev \ + make \ + mongodb-org-shell \ + mongodb-org-tools \ + moreutils \ + mysql-client \ + nano \ + net-tools \ + netcat \ + nodejs \ + openssh-client \ + postgresql-client \ + python-pip \ + redis-tools \ + rubygems \ + ruby-dev \ + shellcheck \ + silversearcher-ag \ + subversion \ + sudo \ + tig \ + vim \ + w3m \ + wget \ + whois \ + xz-utils \ + yarn \ + && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \ + && rm -rf /var/lib/apt/lists/* + + +RUN set -x \ +# composer + && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \ +# awesomeci + && git clone https://github.com/cytopia/awesome-ci.git /usr/local/src/awesome-ci \ +&& cd /usr/local/src/awesome-ci \ +&& git checkout $(git describe --abbrev=0 --tags) \ +&& ./configure --prefix=/usr/local \ +&& make install \ +&& cd / \ +&& rm -rf /usr/local/src/awesome-ci \ + \ + && gem install mixlib-config -v 2.2.4 \ +&& gem install mdl \ +&& gem install scss_lint \ +&& npm install -g eslint \ +&& npm install -g jsonlint \ +&& npm install -g mdlint \ +&& npm install -g gulp \ + \ +# drush + && git clone https://github.com/drush-ops/drush.git /usr/local/src/drush \ +&& cd /usr/local/src/drush \ +&& git checkout 7.4.0 \ + \ + && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/drush \ +&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/drush && composer install --no-interaction --no-progress' \ +&& ln -s /usr/local/src/drush/drush /usr/local/bin/drush \ +&& rm -rf /usr/local/src/drush/.git \ +&& rm -rf /usr/local/src/drush/docs \ +&& rm -rf /usr/local/src/drush/examples \ +&& rm -rf /usr/local/src/drush/misc \ +&& rm -rf /usr/local/src/drush/tests \ + \ +# gitflow + && git clone git://github.com/petervanderdoes/gitflow.git /tmp/gitflow \ +&& cd /tmp/gitflow \ +&& make install \ +&& cd / && rm -rf /tmp/gitflow \ + \ +# grunt + && npm install -g grunt grunt-cli \ +# linuxbrew + && git clone https://github.com/Linuxbrew/brew.git /usr/local/src/linuxbrew \ +&& chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/linuxbrew \ +&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \ + 'echo "PATH=/usr/local/src/linuxbrew/bin:/usr/local/src/linuxbrew/sbin:/usr/bin:/usr/sbin:/bin:/sbin" >> /home/devilbox/${v}' \ +&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \ + 'echo "export MANPATH=/usr/local/src/linuxbrew/share/man:${MANPATH}" >> /home/devilbox/${v}' \ +&& v="${BASH_PROFILE}" su ${MY_USER} -c -p \ + 'echo "export INFOPATH=/usr/local/src/linuxbrew/share/man:${INFOPATH}" >> /home/devilbox/${v}' \ +&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew update' \ +&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew config' \ + \ +# mysqldumpsecure + && git clone https://github.com/cytopia/mysqldump-secure.git /usr/local/src/mysqldump-secure \ +&& cd /usr/local/src/mysqldump-secure \ +&& git checkout $(git describe --abbrev=0 --tags) \ +&& cp /usr/local/src/mysqldump-secure/bin/mysqldump-secure /usr/local/bin \ +&& cp /usr/local/src/mysqldump-secure/etc/mysqldump-secure.conf /etc \ +&& cp /usr/local/src/mysqldump-secure/etc/mysqldump-secure.cnf /etc \ +&& touch /var/log/mysqldump-secure.log \ +&& chown ${MY_USER}:${MY_GROUP} /etc/mysqldump-secure.* \ +&& chown ${MY_USER}:${MY_GROUP} /var/log/mysqldump-secure.log \ +&& chmod 0400 /etc/mysqldump-secure.conf \ +&& chmod 0400 /etc/mysqldump-secure.cnf \ +&& chmod 0644 /var/log/mysqldump-secure.log \ +&& sed -i'' 's/^COMPRESS_ARG=.*/COMPRESS_ARG="-9 -c"/g' /etc/mysqldump-secure.conf \ +&& sed -i'' 's/^DUMP_DIR=.*/DUMP_DIR="\/shared\/backups\/mysql"/g' /etc/mysqldump-secure.conf \ +&& sed -i'' 's/^DUMP_DIR_CHMOD=.*/DUMP_DIR_CHMOD="0755"/g' /etc/mysqldump-secure.conf \ +&& sed -i'' 's/^DUMP_FILE_CHMOD=.*/DUMP_FILE_CHMOD="0644"/g' /etc/mysqldump-secure.conf \ +&& sed -i'' 's/^LOG_CHMOD=.*/LOG_CHMOD="0644"/g' /etc/mysqldump-secure.conf \ +&& sed -i'' 's/^NAGIOS_LOG=.*/NAGIOS_LOG=0/g' /etc/mysqldump-secure.conf \ +&& cd / \ +&& rm -rf /usr/local/src/mysqldump-secure \ + \ +# phalcon + && git clone https://github.com/phalcon/phalcon-devtools /usr/local/src/phalcon-devtools \ +&& cd /usr/local/src/phalcon-devtools \ +&& git checkout v2.0.7 \ + \ + && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/phalcon-devtools \ +&& su - ${MY_USER} -c 'cd /usr/local/src/phalcon-devtools && ./phalcon.sh' \ +&& ln -s /usr/local/src/phalcon-devtools/phalcon.php /usr/local/bin/phalcon \ +&& cd / \ +&& rm -rf /usr/local/src/phalcon-devtools/.git \ + \ +# phpcs + && curl -qL https://github.com/squizlabs/PHP_CodeSniffer/releases/download/2.9.0/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \ +&& chmod +x /usr/local/bin/phpcs \ + \ +# phpcbf + && curl -qL https://github.com/squizlabs/PHP_CodeSniffer/releases/download/2.9.0/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \ +&& chmod +x /usr/local/bin/phpcbf \ + \ +# sass + && gem install sass \ +# webpack + && npm install -g webpack webpack-cli \ +# wpcli + && curl https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -L -o /usr/local/bin/wp \ + && chmod +x /usr/local/bin/wp \ +# yamllint + && apt update && apt install --no-install-recommends --no-install-suggests -y libpython-dev python-setuptools libyaml-dev \ + && pip install yamllint \ + && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps libpython-dev python-setuptools libyaml-dev && rm -rf /var/lib/apt/lists/* \ +# cleanup + && rm -rf /home/${MY_USER}/.*json \ +&& rm -rf /home/${MY_USER}/.cache \ +&& rm -rf /home/${MY_USER}/.composer \ +&& rm -rf /home/${MY_USER}/.config \ +&& rm -rf /home/${MY_USER}/.drush \ +&& rm -rf /home/${MY_USER}/.gem \ +&& rm -rf /home/${MY_USER}/.npm \ +&& rm -rf /home/${MY_USER}/.subversion \ +\ +&& rm -rf /root/.*json \ +&& rm -rf /root/.cache \ +&& rm -rf /root/.composer \ +&& rm -rf /root/.config \ +&& rm -rf /root/.drush \ +&& rm -rf /root/.gem \ +&& rm -rf /root/.npm \ +&& rm -rf /root/.subversion \ +\ +&& rm -rf /tmp/* \ + \ + && true + + +### +### Configure Bash +### +RUN \ + { \ + echo "PATH=\${PATH}:/usr/local/bin:/usr/local/sbin:/usr/local/node/bin"; \ + echo "export PATH"; \ + echo ". /etc/bash-devilbox"; \ + echo "if [ -d /etc/bashrc-devilbox.d/ ]; then"; \ + echo " for f in /etc/bashrc-devilbox.d/*.sh ; do"; \ + echo " if [ -r \"\${f}\" ]; then"; \ + echo " . \"\${f}\""; \ + echo " fi"; \ + echo " done"; \ + echo " unset f"; \ + echo "fi"; \ + } | tee -a /home/${MY_USER}/${BASH_PROFILE} /root/${BASH_PROFILE} \ + && chown ${MY_USER}:${MY_GROUP} /home/${MY_USER}/${BASH_PROFILE} + + +### +### Verify +### +RUN set -x \ + && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^5.3' \ + && /usr/local/sbin/php-fpm --test \ + && PHP_ERROR="$( php -v 2>&1 1>/dev/null )" \ + && if [ -n "${PHP_ERROR}" ]; then echo "${PHP_ERROR}"; false; fi + +RUN set -x \ + && composer --version 2>/dev/null | grep -E 'version\s*[.0-9]+' \ + && mdl --version | grep -E '[.0-9]+' \ +&& scss-lint --version | grep -E '[.0-9]+' \ +&& eslint -v | grep -E '[.0-9]+' \ +&& jsonlint --version | grep -E '[.0-9]+' \ +&& mdlint --version | grep -E '[.0-9]+' \ +&& gulp --version | grep -E '[.0-9]+' \ + \ + && drush --version | grep -E '[.0-9]+' \ + && git-flow version | grep -E '[.0-9]+' \ + && grunt --version | grep -E '[.0-9]+' \ + && su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew --version' | grep -E 'Homebrew\s*[.0-9]+' \ + && mysqldump-secure --version | grep -E 'Version:\s*[.0-9]+' \ + && phalcon commands | grep -E '[.0-9]+' \ + && phpcs --version | grep -E 'version [.0-9]+' \ + && phpcbf --version | grep -E 'version [.0-9]+' \ + && sass --version | grep -E '[.0-9]+' \ + && webpack --version | grep -E '[.0-9]+' \ + && wp --allow-root --version | grep -E '[.0-9]+' \ + && yamllint --version 2>&1 | grep -E '[.0-9]+' \ + && true + + +### +### Copy files +### +COPY ./data/php.d/error-reporting.ini /usr/local/etc/php/conf.d/devilbox-error-reporting.ini +COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh +COPY ./data/docker-entrypoint.d/*.sh /docker-entrypoint.d/ +COPY ./data/bash-devilbox /etc/bash-devilbox +COPY ./data/sudo-devilbox /etc/sudoers.d/devilbox + + +### +### Volumes +### +VOLUME /etc/bashrc-devilbox.d +VOLUME /etc/php-custom.d +VOLUME /etc/php-fpm-custom.d +VOLUME /etc/php-modules.d +VOLUME /shared/backups +VOLUME /var/log/php +VOLUME /var/mail + + +### +### Ports +### +EXPOSE 9000 + + +### +### Where to start inside the container +### +WORKDIR /shared/httpd + + +### +### Entrypoint +### +ENTRYPOINT ["/docker-entrypoint.sh"] diff --git a/Dockerfiles/work/data/docker-entrypoint.sh b/Dockerfiles/work/data/docker-entrypoint.sh index cc132623..fceedc10 100755 --- a/Dockerfiles/work/data/docker-entrypoint.sh +++ b/Dockerfiles/work/data/docker-entrypoint.sh @@ -78,6 +78,14 @@ set_gid "NEW_GID" "${MY_GROUP}" "/home/${MY_USER}" "${DEBUG_LEVEL}" set_timezone "TIMEZONE" "${PHP_INI_DIR}" "${DEBUG_LEVEL}" +### +### PHP-FPM 5.3 Env variables +### +if php -v 2>/dev/null | grep -Eoq '^PHP[[:space:]]5\.3'; then + set_env_php_fpm "/usr/local/etc/php-fpm.d/env.conf" +fi + + ### ### Set Logging ### diff --git a/Makefile b/Makefile index 45343efa..8fb4b63e 100644 --- a/Makefile +++ b/Makefile @@ -27,6 +27,7 @@ help: @printf "%s\n" "make rebuild-prod: Rebuild all prod images" @printf "%s\n" "make rebuild-work: Rebuild all work images" @printf "\n" + @printf "%s\n" "make build-base-53: Build PHP 5.3 base image" @printf "%s\n" "make build-base-54: Build PHP 5.4 base image" @printf "%s\n" "make build-base-55: Build PHP 5.5 base image" @printf "%s\n" "make build-base-56: Build PHP 5.6 base image" @@ -34,6 +35,7 @@ help: @printf "%s\n" "make build-base-71: Build PHP 7.1 base image" @printf "%s\n" "make build-base-72: Build PHP 7.2 base image" @printf "\n" + @printf "%s\n" "make build-mods-53: Build PHP 5.3 mods image" @printf "%s\n" "make build-mods-54: Build PHP 5.4 mods image" @printf "%s\n" "make build-mods-55: Build PHP 5.5 mods image" @printf "%s\n" "make build-mods-56: Build PHP 5.6 mods image" @@ -41,6 +43,7 @@ help: @printf "%s\n" "make build-mods-71: Build PHP 7.1 mods image" @printf "%s\n" "make build-mods-72: Build PHP 7.2 mods image" @printf "\n" + @printf "%s\n" "make build-prod-53: Build PHP 5.3 prod image" @printf "%s\n" "make build-prod-54: Build PHP 5.4 prod image" @printf "%s\n" "make build-prod-55: Build PHP 5.5 prod image" @printf "%s\n" "make build-prod-56: Build PHP 5.6 prod image" @@ -48,6 +51,7 @@ help: @printf "%s\n" "make build-prod-71: Build PHP 7.1 prod image" @printf "%s\n" "make build-prod-72: Build PHP 7.2 prod image" @printf "\n" + @printf "%s\n" "make build-work-54: Build PHP 5.3 work image" @printf "%s\n" "make build-work-54: Build PHP 5.4 work image" @printf "%s\n" "make build-work-55: Build PHP 5.5 work image" @printf "%s\n" "make build-work-56: Build PHP 5.6 work image" @@ -55,6 +59,7 @@ help: @printf "%s\n" "make build-work-71: Build PHP 7.1 work image" @printf "%s\n" "make build-work-72: Build PHP 7.2 work image" @printf "\n" + @printf "%s\n" "make rebuild-base-53: Build PHP 5.3 base image" @printf "%s\n" "make rebuild-base-54: Build PHP 5.4 base image" @printf "%s\n" "make rebuild-base-55: Build PHP 5.5 base image" @printf "%s\n" "make rebuild-base-56: Build PHP 5.6 base image" @@ -62,6 +67,7 @@ help: @printf "%s\n" "make rebuild-base-71: Build PHP 7.1 base image" @printf "%s\n" "make rebuild-base-72: Build PHP 7.2 base image" @printf "\n" + @printf "%s\n" "make rebuild-mods-53: Build PHP 5.3 mods image" @printf "%s\n" "make rebuild-mods-54: Build PHP 5.4 mods image" @printf "%s\n" "make rebuild-mods-55: Build PHP 5.5 mods image" @printf "%s\n" "make rebuild-mods-56: Build PHP 5.6 mods image" @@ -69,6 +75,7 @@ help: @printf "%s\n" "make rebuild-mods-71: Build PHP 7.1 mods image" @printf "%s\n" "make rebuild-mods-72: Build PHP 7.2 mods image" @printf "\n" + @printf "%s\n" "make rebuild-prod-53: Build PHP 5.3 prod image" @printf "%s\n" "make rebuild-prod-54: Build PHP 5.4 prod image" @printf "%s\n" "make rebuild-prod-55: Build PHP 5.5 prod image" @printf "%s\n" "make rebuild-prod-56: Build PHP 5.6 prod image" @@ -76,6 +83,7 @@ help: @printf "%s\n" "make rebuild-prod-71: Build PHP 7.1 prod image" @printf "%s\n" "make rebuild-prod-72: Build PHP 7.2 prod image" @printf "\n" + @printf "%s\n" "make rebuild-work-53: Build PHP 5.3 work image" @printf "%s\n" "make rebuild-work-54: Build PHP 5.4 work image" @printf "%s\n" "make rebuild-work-55: Build PHP 5.5 work image" @printf "%s\n" "make rebuild-work-56: Build PHP 5.6 work image" @@ -117,21 +125,23 @@ rebuild-all: rebuild-base rebuild-mods rebuild-prod rebuild-work ### ### Build categories ### -build-base: build-base-54 build-base-55 build-base-56 build-base-70 build-base-71 build-base-72 -build-mods: build-mods-54 build-mods-55 build-mods-56 build-mods-70 build-mods-71 build-mods-72 -build-prod: build-prod-54 build-prod-55 build-prod-56 build-prod-70 build-prod-71 build-prod-72 -build-work: build-work-54 build-work-55 build-work-56 build-work-70 build-work-71 build-work-72 +build-base: build-base-53 build-base-54 build-base-55 build-base-56 build-base-70 build-base-71 build-base-72 +build-mods: build-mods-53 build-mods-54 build-mods-55 build-mods-56 build-mods-70 build-mods-71 build-mods-72 +build-prod: build-prod-53 build-prod-54 build-prod-55 build-prod-56 build-prod-70 build-prod-71 build-prod-72 +build-work: build-work-53 build-work-54 build-work-55 build-work-56 build-work-70 build-work-71 build-work-72 -rebuild-base: rebuild-base-54 rebuild-base-55 rebuild-base-56 rebuild-base-70 rebuild-base-71 rebuild-base-72 -rebuild-mods: rebuild-mods-54 rebuild-mods-55 rebuild-mods-56 rebuild-mods-70 rebuild-mods-71 rebuild-mods-72 -rebuild-prod: rebuild-prod-54 rebuild-prod-55 rebuild-prod-56 rebuild-prod-70 rebuild-prod-71 rebuild-prod-72 -rebuild-work: rebuild-work-54 rebuild-work-55 rebuild-work-56 rebuild-work-70 rebuild-work-71 rebuild-work-72 +rebuild-base: rebuild-base-53 rebuild-base-54 rebuild-base-55 rebuild-base-56 rebuild-base-70 rebuild-base-71 rebuild-base-72 +rebuild-mods: rebuild-mods-53 rebuild-mods-54 rebuild-mods-55 rebuild-mods-56 rebuild-mods-70 rebuild-mods-71 rebuild-mods-72 +rebuild-prod: rebuild-prod-53 rebuild-prod-54 rebuild-prod-55 rebuild-prod-56 rebuild-prod-70 rebuild-prod-71 rebuild-prod-72 +rebuild-work: rebuild-work-53 rebuild-work-54 rebuild-work-55 rebuild-work-56 rebuild-work-70 rebuild-work-71 rebuild-work-72 ### ### Build separately ### +build-base-53: pull-from-53 + docker build -t devilbox/php-fpm:5.3-base -f $(location)/base/Dockerfile-5.3 $(location)/base build-base-54: pull-from-54 docker build -t devilbox/php-fpm:5.4-base -f $(location)/base/Dockerfile-5.4 $(location)/base build-base-55: pull-from-55 @@ -145,6 +155,8 @@ build-base-71: pull-from-71 build-base-72: pull-from-72 docker build -t devilbox/php-fpm:7.2-base -f $(location)/base/Dockerfile-7.2 $(location)/base +build-mods-53: + docker build -t devilbox/php-fpm:5.3-mods -f $(location)/mods/Dockerfile-5.3 $(location)/mods build-mods-54: docker build -t devilbox/php-fpm:5.4-mods -f $(location)/mods/Dockerfile-5.4 $(location)/mods build-mods-55: @@ -158,6 +170,8 @@ build-mods-71: build-mods-72: docker build -t devilbox/php-fpm:7.2-mods -f $(location)/mods/Dockerfile-7.2 $(location)/mods +build-prod-53: + docker build -t devilbox/php-fpm:5.3-prod -f $(location)/prod/Dockerfile-5.3 $(location)/prod build-prod-54: docker build -t devilbox/php-fpm:5.4-prod -f $(location)/prod/Dockerfile-5.4 $(location)/prod build-prod-55: @@ -171,6 +185,8 @@ build-prod-71: build-prod-72: docker build -t devilbox/php-fpm:7.2-prod -f $(location)/prod/Dockerfile-7.2 $(location)/prod +build-work-53: + docker build -t devilbox/php-fpm:5.3-work -f $(location)/work/Dockerfile-5.3 $(location)/work build-work-54: docker build -t devilbox/php-fpm:5.4-work -f $(location)/work/Dockerfile-5.4 $(location)/work build-work-55: @@ -189,6 +205,8 @@ build-work-72: ### ### Rebuild separately ### +rebuild-base-53: pull-from-53 + docker build --no-cache -t devilbox/php-fpm:5.3-base -f $(location)/base/Dockerfile-5.3 $(location)/base rebuild-base-54: pull-from-54 docker build --no-cache -t devilbox/php-fpm:5.4-base -f $(location)/base/Dockerfile-5.4 $(location)/base rebuild-base-55: pull-from-55 @@ -202,6 +220,8 @@ rebuild-base-71: pull-from-71 rebuild-base-72: pull-from-72 docker build --no-cache -t devilbox/php-fpm:7.2-base -f $(location)/base/Dockerfile-7.2 $(location)/base +rebuild-mods-53: + docker build --no-cache -t devilbox/php-fpm:5.3-mods -f $(location)/mods/Dockerfile-5.3 $(location)/mods rebuild-mods-54: docker build --no-cache -t devilbox/php-fpm:5.4-mods -f $(location)/mods/Dockerfile-5.4 $(location)/mods rebuild-mods-55: @@ -215,6 +235,8 @@ rebuild-mods-71: rebuild-mods-72: docker build --no-cache -t devilbox/php-fpm:7.2-mods -f $(location)/mods/Dockerfile-7.2 $(location)/mods +rebuild-prod-53: + docker build --no-cache -t devilbox/php-fpm:5.3-prod -f $(location)/prod/Dockerfile-5.3 $(location)/prod rebuild-prod-54: docker build --no-cache -t devilbox/php-fpm:5.4-prod -f $(location)/prod/Dockerfile-5.4 $(location)/prod rebuild-prod-55: @@ -228,6 +250,8 @@ rebuild-prod-71: rebuild-prod-72: docker build --no-cache -t devilbox/php-fpm:7.2-prod -f $(location)/prod/Dockerfile-7.2 $(location)/prod +rebuild-work-53: + docker build --no-cache -t devilbox/php-fpm:5.3-work -f $(location)/work/Dockerfile-5.3 $(location)/work rebuild-work-54: docker build --no-cache -t devilbox/php-fpm:5.4-work -f $(location)/work/Dockerfile-5.4 $(location)/work rebuild-work-55: @@ -246,6 +270,8 @@ rebuild-work-72: ### ### Pull base FROM images ### +pull-from-53: + docker pull $(shell grep FROM $(location)/base/Dockerfile-5.3 | sed 's/^FROM//g'; done) pull-from-54: docker pull $(shell grep FROM $(location)/base/Dockerfile-5.4 | sed 's/^FROM//g'; done) pull-from-55: @@ -264,6 +290,8 @@ pull-from-72: ### ### Tests ### +test-base-53: + ./tests/test.sh 5.3 base test-base-54: ./tests/test.sh 5.4 base test-base-55: @@ -277,6 +305,8 @@ test-base-71: test-base-72: ./tests/test.sh 7.2 base +test-mods-53: + ./tests/test.sh 5.3 mods test-mods-54: ./tests/test.sh 5.4 mods test-mods-55: @@ -290,6 +320,8 @@ test-mods-71: test-mods-72: ./tests/test.sh 7.2 mods +test-prod-53: + ./tests/test.sh 5.3 prod test-prod-54: ./tests/test.sh 5.4 prod test-prod-55: @@ -303,6 +335,8 @@ test-prod-71: test-prod-72: ./tests/test.sh 7.2 prod +test-work-53: + ./tests/test.sh 5.3 work test-work-54: ./tests/test.sh 5.4 work test-work-55: diff --git a/README.md b/README.md index 0890869e..6c3cceaf 100644 --- a/README.md +++ b/README.md @@ -172,7 +172,13 @@ The following table shows a more complete overview about the offered Docker imag - base + base + devilbox/php-fpm:5.3-base + + + + + devilbox/php-fpm:5.4-base @@ -216,7 +222,14 @@ The following table shows a more complete overview about the offered Docker imag - mods + mods + devilbox/php-fpm:5.3-mods + + + + + + devilbox/php-fpm:5.4-mods @@ -260,7 +273,14 @@ The following table shows a more complete overview about the offered Docker imag - prod + prod + devilbox/php-fpm:5.3-prod + + + + + + devilbox/php-fpm:5.4-prod @@ -304,7 +324,14 @@ The following table shows a more complete overview about the offered Docker imag - work + work + devilbox/php-fpm:5.3-work + + + + + + devilbox/php-fpm:5.4-work @@ -411,6 +438,11 @@ Check out this table to see which Docker image provides what PHP modules. + + 5.3 + Core, ctype, curl, date, dom, ereg, fileinfo, filter, hash, iconv, json, libxml, mysql, mysqlnd, openssl, pcre, PDO, pdo_sqlite, Phar, posix, readline, recode, Reflection, session, SimpleXML, SPL, SQLite, sqlite3, standard, tokenizer, xml, xmlreader, xmlwriter, zlib + amqp, apc, apcu, bcmath, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, ereg, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imagick, imap, interbase, intl, json, ldap, libxml, mbstring, mcrypt, memcache, memcached, mongo, mongodb, msgpack, mysql, mysqli, mysqlnd, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, phalcon, Phar, posix, pspell, readline, recode, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, SPL, SQLite, sqlite3, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, wddx, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib + 5.4 Core, ctype, curl, date, dom, ereg, fileinfo, filter, hash, iconv, json, libxml, mysqlnd, openssl, pcre, PDO, pdo_sqlite, Phar, posix, readline, recode, Reflection, session, SimpleXML, SPL, sqlite3, standard, tokenizer, xml, xmlreader, xmlwriter, zlib @@ -450,6 +482,7 @@ Check out this table to see which Docker image provides what PHP modules. #### Image: base ```shell +docker pull devilbox/php-fpm:5.3-base docker pull devilbox/php-fpm:5.4-base docker pull devilbox/php-fpm:5.5-base docker pull devilbox/php-fpm:5.6-base @@ -462,6 +495,7 @@ Generic PHP-FPM base image. Use it to derive your own php-fpm docker image from #### Image: mods ```shell +docker pull devilbox/php-fpm:5.3-mods docker pull devilbox/php-fpm:5.4-mods docker pull devilbox/php-fpm:5.5-mods docker pull devilbox/php-fpm:5.6-mods @@ -474,6 +508,7 @@ Generic PHP-FPM image with fully loaded extensions. Use it to derive your own ph #### Image: prod ```shell +docker pull devilbox/php-fpm:5.3-prod docker pull devilbox/php-fpm:5.4-prod docker pull devilbox/php-fpm:5.5-prod docker pull devilbox/php-fpm:5.6-prod @@ -486,6 +521,7 @@ Devilbox production image. This Docker image comes with many injectables, port-f #### Image: work ```shell +docker pull devilbox/php-fpm:5.3-work docker pull devilbox/php-fpm:5.4-work docker pull devilbox/php-fpm:5.5-work docker pull devilbox/php-fpm:5.6-work diff --git a/build/ansible/DOCKERFILES/Dockerfile-base.j2 b/build/ansible/DOCKERFILES/Dockerfile-base.j2 index 431894d4..549c8699 100644 --- a/build/ansible/DOCKERFILES/Dockerfile-base.j2 +++ b/build/ansible/DOCKERFILES/Dockerfile-base.j2 @@ -1,5 +1,9 @@ # Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-base.j2 instead. +{% if php_version == 5.3 %} +FROM devilbox/php-fpm-5.3 +{% else %} FROM php:{{ php_version }}-fpm +{% endif %} MAINTAINER "cytopia" @@ -60,6 +64,9 @@ COPY ./data/docker-entrypoint.sh /docker-entrypoint.sh COPY ./data/docker-entrypoint.d /docker-entrypoint.d COPY ./data/php-fpm.conf /usr/local/etc/php-fpm.conf COPY ./data/php-fpm.d /usr/local/etc/php-fpm.d +{% if php_version == 5.3 %} +COPY ./data/php-fpm.d-docker-5.3.conf /usr/local/etc/php-fpm.d/docker.conf +{% endif %} {% if debug %} diff --git a/build/ansible/group_vars/all.yml b/build/ansible/group_vars/all.yml index 33abf969..1d359181 100644 --- a/build/ansible/group_vars/all.yml +++ b/build/ansible/group_vars/all.yml @@ -19,6 +19,7 @@ debug: True php_all_versions: + - 5.3 - 5.4 - 5.5 - 5.6 @@ -163,16 +164,21 @@ software_available: command: curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer drush: check: drush --version | grep -E '[.0-9]+' - 5.5: + 5.3: pre: | git clone https://github.com/drush-ops/drush.git /usr/local/src/drush \ && cd /usr/local/src/drush \ - && git checkout $(git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | sed 's/^.*tags\///g' | grep ^8 | tail -1) \ + && git checkout 7.4.0 \ 5.4: pre: | git clone https://github.com/drush-ops/drush.git /usr/local/src/drush \ && cd /usr/local/src/drush \ && git checkout $(git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | sed 's/^.*tags\///g' | grep ^8 | tail -1) \ + 5.5: + pre: | + git clone https://github.com/drush-ops/drush.git /usr/local/src/drush \ + && cd /usr/local/src/drush \ + && git checkout $(git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | sed 's/^.*tags\///g' | grep ^8 | tail -1) \ all: pre: | git clone https://github.com/drush-ops/drush.git /usr/local/src/drush \ @@ -188,7 +194,7 @@ software_available: && rm -rf /usr/local/src/drush/misc \ && rm -rf /usr/local/src/drush/tests \ drupalconsole: - disabled: [5.4] + disabled: [5.3, 5.4] check: drupal --version | grep -E 'Drupal Console Launcher\s*[.0-9]' all: command: curl https://drupalconsole.com/installer -L -o /usr/local/bin/drupal @@ -207,26 +213,27 @@ software_available: command: npm install -g grunt grunt-cli laravel: check: laravel --version | grep -E '(Installer|version)\s*[.0-9]+' - 7.0: + disabled: [5.3] + 5.4: pre: | git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \ && cd /usr/local/src/laravel-installer \ - && git checkout v2.0.0 \ - 5.6: + && git checkout v1.3.7 \ + 5.5: pre: | git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \ && cd /usr/local/src/laravel-installer \ && git checkout v2.0.0 \ - 5.5: + 5.6: pre: | git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \ && cd /usr/local/src/laravel-installer \ && git checkout v2.0.0 \ - 5.4: + 7.0: pre: | git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \ && cd /usr/local/src/laravel-installer \ - && git checkout v1.3.7 \ + && git checkout v2.0.0 \ all: pre: | git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \ @@ -277,6 +284,11 @@ software_available: && rm -rf /usr/local/src/mysqldump-secure \ phalcon: check: phalcon commands | grep -E '[.0-9]+' + 5.3: + pre: | + git clone https://github.com/phalcon/phalcon-devtools /usr/local/src/phalcon-devtools \ + && cd /usr/local/src/phalcon-devtools \ + && git checkout v2.0.7 \ 5.4: pre: | git clone https://github.com/phalcon/phalcon-devtools /usr/local/src/phalcon-devtools \ @@ -295,12 +307,20 @@ software_available: && rm -rf /usr/local/src/phalcon-devtools/.git \ phpcs: check: phpcs --version | grep -E 'version [.0-9]+' + 5.3: + command: | + curl -qL https://github.com/squizlabs/PHP_CodeSniffer/releases/download/2.9.0/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \ + && chmod +x /usr/local/bin/phpcs \ all: command: | curl -q https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \ && chmod +x /usr/local/bin/phpcs \ phpcbf: check: phpcbf --version | grep -E 'version [.0-9]+' + 5.3: + command: | + curl -qL https://github.com/squizlabs/PHP_CodeSniffer/releases/download/2.9.0/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \ + && chmod +x /usr/local/bin/phpcbf \ all: command: | curl -q https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \ @@ -310,6 +330,7 @@ software_available: all: command: gem install sass symfony: + disabled: [5.3] check: symfony --version | grep -E 'version\s*[.0-9]+' all: command: curl https://symfony.com/installer -L -o /usr/local/bin/symfony @@ -479,6 +500,9 @@ extensions_available: build_dep: [librabbitmq-dev] run_dep: [librabbitmq1] apcu: + 5.3: + type: pecl + version: 4.0.11 5.4: type: pecl version: 4.0.11 @@ -534,21 +558,27 @@ extensions_available: configure: --with-openssl-dir build_dep: [libssl-dev] gd: - 7.2: + 5.3: type: builtin - configure: --with-gd --with-webp-dir=/usr --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --enable-gd-jis-conv - build_dep: [libpng-dev, libjpeg-dev, libxpm-dev, libvpx-dev, zlib1g-dev, libfreetype6-dev, libwebp-dev] - run_dep: [libpng16-16, libjpeg62-turbo, libxpm4, libvpx4, libfreetype6, libwebp6] - 7.1: + pre: ln -s /usr/lib/x86_64-linux-gnu/libXpm.* /usr/lib/ && mkdir /usr/include/freetype2/freetype && ln -s /usr/include/freetype2/freetype.h /usr/include/freetype2/freetype/freetype.h + configure: --with-gd --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --enable-gd-jis-conv --enable-gd-native-ttf + build_dep: [libpng-dev, libjpeg-dev, libxpm-dev, libvpx-dev, zlib1g-dev, libfreetype6-dev] + run_dep: [libpng12-0, libjpeg62-turbo, libxpm4, libvpx1, libfreetype6] + 7.0: type: builtin configure: --with-gd --with-webp-dir=/usr --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --enable-gd-jis-conv --enable-gd-native-ttf build_dep: [libpng-dev, libjpeg-dev, libxpm-dev, libvpx-dev, zlib1g-dev, libfreetype6-dev, libwebp-dev] run_dep: [libpng12-0, libjpeg62-turbo, libxpm4, libvpx1, libfreetype6, libwebp-dev] - 7.0: + 7.1: type: builtin configure: --with-gd --with-webp-dir=/usr --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --enable-gd-jis-conv --enable-gd-native-ttf build_dep: [libpng-dev, libjpeg-dev, libxpm-dev, libvpx-dev, zlib1g-dev, libfreetype6-dev, libwebp-dev] run_dep: [libpng12-0, libjpeg62-turbo, libxpm4, libvpx1, libfreetype6, libwebp-dev] + 7.2: + type: builtin + configure: --with-gd --with-webp-dir=/usr --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --enable-gd-jis-conv + build_dep: [libpng-dev, libjpeg-dev, libxpm-dev, libvpx-dev, zlib1g-dev, libfreetype6-dev, libwebp-dev] + run_dep: [libpng16-16, libjpeg62-turbo, libxpm4, libvpx4, libfreetype6, libwebp6] all: type: builtin pre: ln -s /usr/lib/x86_64-linux-gnu/libXpm.* /usr/lib/ @@ -573,6 +603,11 @@ extensions_available: all: type: pecl imagick: + 5.3: + type: pecl + version: 3.3.0 + build_dep: [libmagickwand-dev] + run_dep: [libmagickwand-6.q16-2] 7.2: type: pecl run_dep: [libmagickwand-6.q16-3] @@ -626,7 +661,7 @@ extensions_available: run_dep: [libmcrypt4] build_dep: [libmcrypt-dev] memcache: - 7.2: + 7.0: type: git git_url: https://github.com/websupport-sk/pecl-memcache configure: --with-zlib-dir=/usr @@ -634,7 +669,7 @@ extensions_available: type: git git_url: https://github.com/websupport-sk/pecl-memcache configure: --with-zlib-dir=/usr - 7.0: + 7.2: type: git git_url: https://github.com/websupport-sk/pecl-memcache configure: --with-zlib-dir=/usr @@ -642,6 +677,9 @@ extensions_available: type: pecl build_dep: [zlib1g-dev] memcached: + 5.3: + type: pecl + version: 2.2.0 5.4: type: pecl version: 2.2.0 @@ -662,13 +700,21 @@ extensions_available: command: yes | pecl install mongo build_dep: [libssl-dev, libsasl2-dev] mongodb: + 5.3: + type: pecl + version: 0.6.3 + build_dep: [libssl-dev, libsasl2-dev] 5.4: type: pecl version: 1.2.11 + build_dep: [libssl-dev, libsasl2-dev] all: type: pecl - build_dep: [libssl-dev] + build_dep: [libssl-dev, libsasl2-dev] msgpack: + 5.3: + type: pecl + version: 0.5.7 5.4: type: pecl version: 0.5.7 @@ -684,6 +730,7 @@ extensions_available: disabled: [7.0, 7.1, 7.2] # Deprecated in newer versions all: type: builtin + run_dep: [libmysqlclient18] mysqli: all: type: builtin @@ -694,6 +741,9 @@ extensions_available: odbc: disabled: "{{ php_all_versions }}" # TODO: sqlext.h' not found! opcache: + 5.3: + type: pecl + command: pecl install zendopcache 5.4: type: pecl command: pecl install zendopcache @@ -746,6 +796,11 @@ extensions_available: build_dep: [libpq-dev] run_dep: [libpq5] phalcon: + 5.3: + type: git + git_url: https://github.com/phalcon/cphalcon + git_ref: phalcon-v2.0.9 + command: cd build && ./install 5.4: type: git git_url: https://github.com/phalcon/cphalcon @@ -771,7 +826,7 @@ extensions_available: build_dep: [libpspell-dev] run_dep: [libaspell15] readline: - disabled: [5.4] # Available by default + disabled: [5.3, 5.4] # Available by default all: type: builtin build_dep: [libedit-dev, libreadline-dev] @@ -811,13 +866,16 @@ extensions_available: all: type: builtin sodium: - disabled: [5.4, 5.5, 5.6, 7.0, 7.1] + disabled: [5.3, 5.4, 5.5, 5.6, 7.0, 7.1] 7.2: type: builtin build_dep: [libsodium-dev] spl: disabled: "{{ php_all_versions }}" # TODO: Did not work swoole: + 5.3: + type: pecl + version: 1.9.23 5.4: type: pecl version: 1.9.23 @@ -855,7 +913,7 @@ extensions_available: all: type: builtin uploadprogress: - 7.2: + 7.0: type: git git_url: https://github.com/php/pecl-php-uploadprogress configure: --enable-uploadprogress @@ -863,7 +921,7 @@ extensions_available: type: git git_url: https://github.com/php/pecl-php-uploadprogress configure: --enable-uploadprogress - 7.0: + 7.2: type: git git_url: https://github.com/php/pecl-php-uploadprogress configure: --enable-uploadprogress @@ -875,6 +933,9 @@ extensions_available: configure: --with-libxml-dir=/usr build_dep: [libxml2-dev] xdebug: + 5.3: + type: pecl + version: 2.2.7 5.4: type: pecl version: 2.4.1 @@ -913,6 +974,11 @@ extensions_available: build_dep: [libxslt-dev] run_dep: [libxslt1.1] zip: + 5.3: + type: builtin + configure: --with-zlib-dir=/usr --with-pcre-dir=/usr + build_dep: [zlib1g-dev] + run_dep: [] 5.4: type: builtin configure: --with-zlib-dir=/usr --with-pcre-dir=/usr diff --git a/build/ansible/inventory b/build/ansible/inventory index 96128d30..e56ea58d 100644 --- a/build/ansible/inventory +++ b/build/ansible/inventory @@ -1,4 +1,5 @@ [php] +php-5.3 php_version=5.3 ansible_connection=local php-5.4 php_version=5.4 ansible_connection=local php-5.5 php_version=5.5 ansible_connection=local php-5.6 php_version=5.6 ansible_connection=local diff --git a/build/gen-readme.sh b/build/gen-readme.sh index 849eb91b..245b5e08 100755 --- a/build/gen-readme.sh +++ b/build/gen-readme.sh @@ -14,6 +14,7 @@ CWD="$(cd -P -- "$(dirname -- "$0")" && pwd -P)" ### print_usage() { echo "Usage: gen-readme.sh" + echo " gen-readme.sh 5.3" echo " gen-readme.sh 5.4" echo " gen-readme.sh 5.5" echo " gen-readme.sh 5.6" @@ -61,6 +62,7 @@ update_readme() { ### if [ "${#}" -eq "0" ]; then # Update PHP modules for all versions at once + update_readme "5.3" update_readme "5.4" update_readme "5.5" update_readme "5.6" @@ -73,6 +75,7 @@ elif [ "${#}" -gt "1" ]; then print_usage exit 1 else + if [ "${1}" != "5.3" ] \ if [ "${1}" != "5.4" ] \ && [ "${1}" != "5.5" ] \ && [ "${1}" != "5.6" ] \