From 9d8167ca77bee3f1cfca9cd7a587f17ab9011baf Mon Sep 17 00:00:00 2001 From: cytopia Date: Sun, 13 May 2018 17:54:09 +0200 Subject: [PATCH 1/2] New container: PHP 7.3 --- .travis.yml | 1 + Dockerfiles/base/Dockerfile-7.3 | 84 ++++ Dockerfiles/mods/Dockerfile-7.3 | 381 +++++++++++++++++++ Dockerfiles/prod/Dockerfile-7.3 | 77 ++++ Dockerfiles/work/Dockerfile-7.3 | 322 ++++++++++++++++ Makefile | 50 ++- README.md | 45 ++- build/ansible/DOCKERFILES/Dockerfile-base.j2 | 2 + build/ansible/group_vars/all.yml | 61 ++- build/ansible/inventory | 1 + build/gen-readme.sh | 5 +- 11 files changed, 1013 insertions(+), 16 deletions(-) create mode 100644 Dockerfiles/base/Dockerfile-7.3 create mode 100644 Dockerfiles/mods/Dockerfile-7.3 create mode 100644 Dockerfiles/prod/Dockerfile-7.3 create mode 100644 Dockerfiles/work/Dockerfile-7.3 diff --git a/.travis.yml b/.travis.yml index 4e151a41..fb2166f3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,6 +30,7 @@ env: - PHP=7.0 - PHP=7.1 - PHP=7.2 + - PHP=7.3 ### diff --git a/Dockerfiles/base/Dockerfile-7.3 b/Dockerfiles/base/Dockerfile-7.3 new file mode 100644 index 00000000..75d714dc --- /dev/null +++ b/Dockerfiles/base/Dockerfile-7.3 @@ -0,0 +1,84 @@ +# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-base.j2 instead. +FROM devilbox/php-fpm-7.3 +MAINTAINER "cytopia" + + +### +### Labels +### +LABEL \ + name="cytopia's PHP-FPM 7.3 Image" \ + image="devilbox/php-fpm" \ + tag="7.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 + + +### +### Verify +### +RUN set -x \ + && php -v | grep -oE 'PHP\s[.0-9]+' | grep -oE '[.0-9]+' | grep '^7.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/mods/Dockerfile-7.3 b/Dockerfiles/mods/Dockerfile-7.3 new file mode 100644 index 00000000..1643b4b4 --- /dev/null +++ b/Dockerfiles/mods/Dockerfile-7.3 @@ -0,0 +1,381 @@ +# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-mods.j2 instead. +FROM devilbox/php-fpm:7.3-base +MAINTAINER "cytopia" + + +### +### Labels +### +LABEL \ + name="cytopia's PHP-FPM 7.3 Image" \ + image="devilbox/php-fpm" \ + tag="7.3-mods" \ + vendor="devilbox" \ + license="MIT" + + +### +### Envs +### +ENV BUILD_DEPS \ + libbz2-dev \ + libcurl4-openssl-dev \ + libxml2-dev \ + libenchant-dev \ + libssl-dev \ + libpng-dev \ + libjpeg-dev \ + libxpm-dev \ + libvpx-dev \ + zlib1g-dev \ + libfreetype6-dev \ + libwebp-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 \ + libmemcached-dev \ + libssl-dev \ + libsasl2-dev \ + freetds-dev \ + libfbclient2 \ + libib-util \ + firebird-dev \ + zlib1g-dev \ + libpq-dev \ + libsqlite3-dev \ + libpq-dev \ + libssl-dev \ + libpspell-dev \ + libedit-dev \ + libreadline-dev \ + librecode-dev \ + libmm-dev \ + libxml2-dev \ + libssl-dev \ + libsnmp-dev \ + snmp \ + libxml2-dev \ + libsodium-dev \ + libnghttp2-dev \ + libssl-dev \ + libtidy-dev \ + libxml2-dev \ + libxml2-dev \ + libxml2-dev \ + libxml2-dev \ + libxslt-dev \ + zlib1g-dev \ + libzip-dev \ + ca-certificates \ + git + +ENV RUN_DEPS \ + libenchant1c2a \ + libpng16-16 \ + libjpeg62-turbo \ + libxpm4 \ + libvpx4 \ + libfreetype6 \ + libwebp6 \ + libmagickwand-6.q16-3 \ + libc-client2007e \ + libfbclient2 \ + libicu57 \ + libmcrypt4 \ + libmemcachedutil2 \ + libsybdb5 \ + libfbclient2 \ + libpq5 \ + libpq5 \ + libaspell15 \ + librecode0 \ + snmp \ + libnghttp2-14 \ + libtidy5 \ + libxslt1.1 \ + libzip4 \ + ca-certificates + + +### +### Install +### +RUN set -x \ + && apt-get update \ + && apt-get install --no-install-recommends --no-install-suggests -y \ + ${BUILD_DEPS} \ + \ + \ + && pecl install apcu \ + && 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/ \ + && /usr/local/bin/docker-php-ext-configure gd --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 \ + && /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 \ + && 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 \ + && pecl install mcrypt-1.0.1 \ + && docker-php-ext-enable mcrypt \ + && git clone -v https://github.com/php-memcached-dev/php-memcached /tmp/memcached \ + && cd /tmp/memcached \ + && git checkout master \ + && phpize && ./configure --enable-memcached && make && make install \ + && docker-php-ext-enable memcached \ + && cd / && rm -rf /tmp/memcached \ + && pecl install mongodb \ + && docker-php-ext-enable mongodb \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) mysqli \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) 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 \ + && /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) readline \ + && /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 \ + && /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) sodium \ + && pecl install swoole \ + && 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 \ + && git clone -v https://github.com/php/pecl-php-uploadprogress /tmp/uploadprogress \ + && cd /tmp/uploadprogress \ + && phpize \ + && ./configure --enable-uploadprogress \ + && make -j$(getconf _NPROCESSORS_ONLN) \ + && make install \ + && docker-php-ext-enable uploadprogress \ + && cd / && rm -rf /tmp/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 \ + && /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 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-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 '^7.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 '^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 '^mcrypt$' \ + && php-fpm -m | grep -oiE '^mcrypt$' \ + && php -m | grep -oiE '^memcached$' \ + && php-fpm -m | grep -oiE '^memcached$' \ + && php -m | grep -oiE '^mongodb$' \ + && php-fpm -m | grep -oiE '^mongodb$' \ + && 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 '^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 '^readline$' \ + && php-fpm -m | grep -oiE '^readline$' \ + && 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 '^sodium$' \ + && php-fpm -m | grep -oiE '^sodium$' \ + && 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 '^xml$' \ + && php-fpm -m | grep -oiE '^xml$' \ + && 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/prod/Dockerfile-7.3 b/Dockerfiles/prod/Dockerfile-7.3 new file mode 100644 index 00000000..7beefbb3 --- /dev/null +++ b/Dockerfiles/prod/Dockerfile-7.3 @@ -0,0 +1,77 @@ +# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-prod.j2 instead. +FROM devilbox/php-fpm:7.3-mods +MAINTAINER "cytopia" + + +### +### Labels +### +LABEL \ + name="cytopia's PHP-FPM 7.3 Image" \ + image="devilbox/php-fpm" \ + tag="7.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 '^7.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/work/Dockerfile-7.3 b/Dockerfiles/work/Dockerfile-7.3 new file mode 100644 index 00000000..8c0a43d4 --- /dev/null +++ b/Dockerfiles/work/Dockerfile-7.3 @@ -0,0 +1,322 @@ +# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-work.j2 instead. +FROM devilbox/php-fpm:7.3-prod +MAINTAINER "cytopia" + + +### +### Labels +### +LABEL \ + name="cytopia's PHP-FPM 7.3 Image" \ + image="devilbox/php-fpm" \ + tag="7.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 artful 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 stretch 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/ stretch-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 $(git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | tail -1 | sed 's/^.*tags\///g') \ + \ + && 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 \ + \ +# drupalconsole + && curl https://drupalconsole.com/installer -L -o /usr/local/bin/drupal \ + && chmod +x /usr/local/bin/drupal \ +# 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 \ +# laravel + && git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \ +&& cd /usr/local/src/laravel-installer \ +&& git checkout $(git describe --abbrev=0 --tags) \ + \ + && chown -R ${MY_USER}:${MY_GROUP} /usr/local/src/laravel-installer \ +&& su - ${MY_USER} -c 'PATH=/usr/local/bin:$PATH; cd /usr/local/src/laravel-installer && composer install' \ +&& ln -s /usr/local/src/laravel-installer/laravel /usr/local/bin/laravel \ +&& rm -rf /usr/local/src/laravel-installer/laravel/.git \ + \ +# 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 \ + \ +# phpcs + && curl -q https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \ +&& chmod +x /usr/local/bin/phpcs \ + \ +# phpcbf + && curl -q https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \ +&& chmod +x /usr/local/bin/phpcbf \ + \ +# sass + && gem install sass \ +# symfony + && curl https://symfony.com/installer -L -o /usr/local/bin/symfony \ + && chmod +x /usr/local/bin/symfony \ +# 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 '^7.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]+' \ + && drupal --version | grep -E 'Drupal Console Launcher\s*[.0-9]' \ + && git-flow version | grep -E '[.0-9]+' \ + && grunt --version | grep -E '[.0-9]+' \ + && laravel --version | grep -E '(Installer|version)\s*[.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]+' \ + && phpcs --version | grep -E 'version [.0-9]+' \ + && phpcbf --version | grep -E 'version [.0-9]+' \ + && sass --version | grep -E '[.0-9]+' \ + && symfony --version | grep -E 'version\s*[.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/Makefile b/Makefile index 8fb4b63e..61427b56 100644 --- a/Makefile +++ b/Makefile @@ -34,6 +34,7 @@ help: @printf "%s\n" "make build-base-70: Build PHP 7.0 base image" @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 "%s\n" "make build-base-73: Build PHP 7.3 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" @@ -42,6 +43,7 @@ help: @printf "%s\n" "make build-mods-70: Build PHP 7.0 mods image" @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 "%s\n" "make build-mods-73: Build PHP 7.3 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" @@ -50,6 +52,7 @@ help: @printf "%s\n" "make build-prod-70: Build PHP 7.0 prod image" @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 "%s\n" "make build-prod-73: Build PHP 7.3 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" @@ -58,6 +61,7 @@ help: @printf "%s\n" "make build-work-70: Build PHP 7.0 work image" @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 "%s\n" "make build-work-73: Build PHP 7.3 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" @@ -66,6 +70,7 @@ help: @printf "%s\n" "make rebuild-base-70: Build PHP 7.0 base image" @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 "%s\n" "make rebuild-base-73: Build PHP 7.3 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" @@ -74,6 +79,7 @@ help: @printf "%s\n" "make rebuild-mods-70: Build PHP 7.0 mods image" @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 "%s\n" "make rebuild-mods-73: Build PHP 7.3 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" @@ -82,6 +88,7 @@ help: @printf "%s\n" "make rebuild-prod-70: Build PHP 7.0 prod image" @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 "%s\n" "make rebuild-prod-73: Build PHP 7.3 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" @@ -90,6 +97,7 @@ help: @printf "%s\n" "make rebuild-work-70: Build PHP 7.0 work image" @printf "%s\n" "make rebuild-work-71: Build PHP 7.1 work image" @printf "%s\n" "make rebuild-work-72: Build PHP 7.2 work image" + @printf "%s\n" "make rebuild-work-73: Build PHP 7.3 work image" @@ -125,15 +133,15 @@ rebuild-all: rebuild-base rebuild-mods rebuild-prod rebuild-work ### ### Build categories ### -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 +build-base: build-base-53 build-base-54 build-base-55 build-base-56 build-base-70 build-base-71 build-base-72 build-base-73 +build-mods: build-mods-53 build-mods-54 build-mods-55 build-mods-56 build-mods-70 build-mods-71 build-mods-72 build-mods-73 +build-prod: build-prod-53 build-prod-54 build-prod-55 build-prod-56 build-prod-70 build-prod-71 build-prod-72 build-prod-73 +build-work: build-work-53 build-work-54 build-work-55 build-work-56 build-work-70 build-work-71 build-work-72 build-work-73 -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 +rebuild-base: rebuild-base-53 rebuild-base-54 rebuild-base-55 rebuild-base-56 rebuild-base-70 rebuild-base-71 rebuild-base-72 rebuild-base-73 +rebuild-mods: rebuild-mods-53 rebuild-mods-54 rebuild-mods-55 rebuild-mods-56 rebuild-mods-70 rebuild-mods-71 rebuild-mods-72 rebuild-mods-73 +rebuild-prod: rebuild-prod-53 rebuild-prod-54 rebuild-prod-55 rebuild-prod-56 rebuild-prod-70 rebuild-prod-71 rebuild-prod-72 rebuild-prod-73 +rebuild-work: rebuild-work-53 rebuild-work-54 rebuild-work-55 rebuild-work-56 rebuild-work-70 rebuild-work-71 rebuild-work-72 rebuild-work-73 @@ -154,6 +162,8 @@ build-base-71: pull-from-71 docker build -t devilbox/php-fpm:7.1-base -f $(location)/base/Dockerfile-7.1 $(location)/base build-base-72: pull-from-72 docker build -t devilbox/php-fpm:7.2-base -f $(location)/base/Dockerfile-7.2 $(location)/base +build-base-73: pull-from-73 + docker build -t devilbox/php-fpm:7.3-base -f $(location)/base/Dockerfile-7.3 $(location)/base build-mods-53: docker build -t devilbox/php-fpm:5.3-mods -f $(location)/mods/Dockerfile-5.3 $(location)/mods @@ -169,6 +179,8 @@ build-mods-71: docker build -t devilbox/php-fpm:7.1-mods -f $(location)/mods/Dockerfile-7.1 $(location)/mods build-mods-72: docker build -t devilbox/php-fpm:7.2-mods -f $(location)/mods/Dockerfile-7.2 $(location)/mods +build-mods-73: + docker build -t devilbox/php-fpm:7.3-mods -f $(location)/mods/Dockerfile-7.3 $(location)/mods build-prod-53: docker build -t devilbox/php-fpm:5.3-prod -f $(location)/prod/Dockerfile-5.3 $(location)/prod @@ -184,6 +196,8 @@ build-prod-71: docker build -t devilbox/php-fpm:7.1-prod -f $(location)/prod/Dockerfile-7.1 $(location)/prod build-prod-72: docker build -t devilbox/php-fpm:7.2-prod -f $(location)/prod/Dockerfile-7.2 $(location)/prod +build-prod-73: + docker build -t devilbox/php-fpm:7.3-prod -f $(location)/prod/Dockerfile-7.3 $(location)/prod build-work-53: docker build -t devilbox/php-fpm:5.3-work -f $(location)/work/Dockerfile-5.3 $(location)/work @@ -199,6 +213,8 @@ build-work-71: docker build -t devilbox/php-fpm:7.1-work -f $(location)/work/Dockerfile-7.1 $(location)/work build-work-72: docker build -t devilbox/php-fpm:7.2-work -f $(location)/work/Dockerfile-7.2 $(location)/work +build-work-73: + docker build -t devilbox/php-fpm:7.3-work -f $(location)/work/Dockerfile-7.3 $(location)/work @@ -219,6 +235,8 @@ rebuild-base-71: pull-from-71 docker build --no-cache -t devilbox/php-fpm:7.1-base -f $(location)/base/Dockerfile-7.1 $(location)/base 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-base-73: pull-from-73 + docker build --no-cache -t devilbox/php-fpm:7.3-base -f $(location)/base/Dockerfile-7.3 $(location)/base rebuild-mods-53: docker build --no-cache -t devilbox/php-fpm:5.3-mods -f $(location)/mods/Dockerfile-5.3 $(location)/mods @@ -234,6 +252,8 @@ rebuild-mods-71: docker build --no-cache -t devilbox/php-fpm:7.1-mods -f $(location)/mods/Dockerfile-7.1 $(location)/mods rebuild-mods-72: docker build --no-cache -t devilbox/php-fpm:7.2-mods -f $(location)/mods/Dockerfile-7.2 $(location)/mods +rebuild-mods-73: + docker build --no-cache -t devilbox/php-fpm:7.3-mods -f $(location)/mods/Dockerfile-7.3 $(location)/mods rebuild-prod-53: docker build --no-cache -t devilbox/php-fpm:5.3-prod -f $(location)/prod/Dockerfile-5.3 $(location)/prod @@ -249,6 +269,8 @@ rebuild-prod-71: docker build --no-cache -t devilbox/php-fpm:7.1-prod -f $(location)/prod/Dockerfile-7.1 $(location)/prod rebuild-prod-72: docker build --no-cache -t devilbox/php-fpm:7.2-prod -f $(location)/prod/Dockerfile-7.2 $(location)/prod +rebuild-prod-73: + docker build --no-cache -t devilbox/php-fpm:7.3-prod -f $(location)/prod/Dockerfile-7.3 $(location)/prod rebuild-work-53: docker build --no-cache -t devilbox/php-fpm:5.3-work -f $(location)/work/Dockerfile-5.3 $(location)/work @@ -264,6 +286,8 @@ rebuild-work-71: docker build --no-cache -t devilbox/php-fpm:7.1-work -f $(location)/work/Dockerfile-7.1 $(location)/work rebuild-work-72: docker build --no-cache -t devilbox/php-fpm:7.2-work -f $(location)/work/Dockerfile-7.2 $(location)/work +rebuild-work-73: + docker build --no-cache -t devilbox/php-fpm:7.3-work -f $(location)/work/Dockerfile-7.3 $(location)/work @@ -284,6 +308,8 @@ pull-from-71: docker pull $(shell grep FROM $(location)/base/Dockerfile-7.1 | sed 's/^FROM//g'; done) pull-from-72: docker pull $(shell grep FROM $(location)/base/Dockerfile-7.2 | sed 's/^FROM//g'; done) +pull-from-73: + docker pull $(shell grep FROM $(location)/base/Dockerfile-7.3 | sed 's/^FROM//g'; done) @@ -304,6 +330,8 @@ test-base-71: ./tests/test.sh 7.1 base test-base-72: ./tests/test.sh 7.2 base +test-base-73: + ./tests/test.sh 7.3 base test-mods-53: ./tests/test.sh 5.3 mods @@ -319,6 +347,8 @@ test-mods-71: ./tests/test.sh 7.1 mods test-mods-72: ./tests/test.sh 7.2 mods +test-mods-73: + ./tests/test.sh 7.3 mods test-prod-53: ./tests/test.sh 5.3 prod @@ -334,6 +364,8 @@ test-prod-71: ./tests/test.sh 7.1 prod test-prod-72: ./tests/test.sh 7.2 prod +test-prod-73: + ./tests/test.sh 7.3 prod test-work-53: ./tests/test.sh 5.3 work @@ -349,3 +381,5 @@ test-work-71: ./tests/test.sh 7.1 work test-work-72: ./tests/test.sh 7.2 work +test-work-73: + ./tests/test.sh 7.3 work diff --git a/README.md b/README.md index 6c3cceaf..952d263f 100644 --- a/README.md +++ b/README.md @@ -172,7 +172,7 @@ The following table shows a more complete overview about the offered Docker imag - base + base devilbox/php-fpm:5.3-base @@ -220,9 +220,16 @@ The following table shows a more complete overview about the offered Docker imag + + devilbox/php-fpm:7.3-base + + + + + - mods + mods devilbox/php-fpm:5.3-mods @@ -271,9 +278,16 @@ The following table shows a more complete overview about the offered Docker imag + + devilbox/php-fpm:7.3-mods + + + + + - prod + prod devilbox/php-fpm:5.3-prod @@ -322,9 +336,16 @@ The following table shows a more complete overview about the offered Docker imag + + devilbox/php-fpm:7.3-prod + + + + + - work + work devilbox/php-fpm:5.3-work @@ -373,6 +394,13 @@ The following table shows a more complete overview about the offered Docker imag + + devilbox/php-fpm:7.3-work + + + + + @@ -473,6 +501,11 @@ Check out this table to see which Docker image provides what PHP modules. Core, ctype, curl, date, dom, fileinfo, filter, ftp, hash, iconv, json, libxml, mbstring, mysqlnd, openssl, pcre, PDO, pdo_sqlite, Phar, posix, readline, Reflection, session, SimpleXML, sodium, SPL, sqlite3, standard, tokenizer, xml, xmlreader, xmlwriter, zlib amqp, apcu, bcmath, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imagick, imap, interbase, intl, json, ldap, libxml, mbstring, mcrypt, memcache, memcached, mongodb, msgpack, 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, sodium, SPL, sqlite3, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, wddx, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib + + 7.3 + Core, ctype, curl, date, dom, fileinfo, filter, ftp, hash, iconv, json, libxml, mbstring, mysqlnd, openssl, pcre, PDO, pdo_sqlite, Phar, posix, readline, Reflection, session, SimpleXML, sodium, SPL, sqlite3, standard, tokenizer, xml, xmlreader, xmlwriter, zlib + apcu, bcmath, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imagick, imap, interbase, intl, json, ldap, libxml, mbstring, mcrypt, mongodb, mysqli, mysqlnd, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, pspell, readline, recode, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, sodium, SPL, sqlite3, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, wddx, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib + @@ -489,6 +522,7 @@ docker pull devilbox/php-fpm:5.6-base docker pull devilbox/php-fpm:7.0-base docker pull devilbox/php-fpm:7.1-base docker pull devilbox/php-fpm:7.2-base +docker pull devilbox/php-fpm:7.3-base ``` Generic PHP-FPM base image. Use it to derive your own php-fpm docker image from it and add more extensions, tools and injectables.

(Does not offer any environment variables except for `NEW_UID` and `NEW_GID`) @@ -502,6 +536,7 @@ docker pull devilbox/php-fpm:5.6-mods docker pull devilbox/php-fpm:7.0-mods docker pull devilbox/php-fpm:7.1-mods docker pull devilbox/php-fpm:7.2-mods +docker pull devilbox/php-fpm:7.3-mods ``` Generic PHP-FPM image with fully loaded extensions. Use it to derive your own php-fpm docker image from it and add more extensions, tools and injectables.

(Does not offer any environment variables except for `NEW_UID` and `NEW_GID`) @@ -515,6 +550,7 @@ docker pull devilbox/php-fpm:5.6-prod docker pull devilbox/php-fpm:7.0-prod docker pull devilbox/php-fpm:7.1-prod docker pull devilbox/php-fpm:7.2-prod +docker pull devilbox/php-fpm:7.3-prod ``` Devilbox production image. This Docker image comes with many injectables, port-forwardings, mail-catch-all and user/group rewriting. @@ -528,6 +564,7 @@ docker pull devilbox/php-fpm:5.6-work docker pull devilbox/php-fpm:7.0-work docker pull devilbox/php-fpm:7.1-work docker pull devilbox/php-fpm:7.2-work +docker pull devilbox/php-fpm:7.3-work ``` Devilbox development image. Same as prod, but comes with lots of locally installed tools to make development inside the container as convenient as possible. See [Integrated Development Environment](#integrated-development-environment) for more information about this. diff --git a/build/ansible/DOCKERFILES/Dockerfile-base.j2 b/build/ansible/DOCKERFILES/Dockerfile-base.j2 index 549c8699..da51ab90 100644 --- a/build/ansible/DOCKERFILES/Dockerfile-base.j2 +++ b/build/ansible/DOCKERFILES/Dockerfile-base.j2 @@ -1,6 +1,8 @@ # Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-base.j2 instead. {% if php_version == 5.3 %} FROM devilbox/php-fpm-5.3 +{% elif php_version == 7.3 %} +FROM devilbox/php-fpm-7.3 {% else %} FROM php:{{ php_version }}-fpm {% endif %} diff --git a/build/ansible/group_vars/all.yml b/build/ansible/group_vars/all.yml index 1d359181..a12d13f7 100644 --- a/build/ansible/group_vars/all.yml +++ b/build/ansible/group_vars/all.yml @@ -26,6 +26,7 @@ php_all_versions: - 7.0 - 7.1 - 7.2 + - 7.3 @@ -93,6 +94,8 @@ apt_repositories_available: git: 7.2: deb: deb http://ppa.launchpad.net/git-core/ppa/ubuntu artful main + 7.3: + deb: deb http://ppa.launchpad.net/git-core/ppa/ubuntu artful main all: deb: deb http://ppa.launchpad.net/git-core/ppa/ubuntu wily main key: A1715D88E1DF1F24 @@ -103,12 +106,16 @@ apt_repositories_available: node: 7.2: deb: deb http://deb.nodesource.com/node_8.x stretch main + 7.3: + deb: deb http://deb.nodesource.com/node_8.x stretch main all: deb: deb http://deb.nodesource.com/node_8.x jessie main pre: curl -q "https://deb.nodesource.com/gpgkey/nodesource.gpg.key" 2>/dev/null | apt-key add - pgsql: 7.2: deb: deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main + 7.3: + deb: deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main all: deb: deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main pre: curl -q https://www.postgresql.org/media/keys/ACCC4CF8.asc 2>/dev/null | apt-key add - @@ -283,6 +290,7 @@ software_available: && cd / \ && rm -rf /usr/local/src/mysqldump-secure \ phalcon: + disabled: [7.3] check: phalcon commands | grep -E '[.0-9]+' 5.3: pre: | @@ -491,6 +499,7 @@ extensions_enabled: # command: [optional] Overwrite default command (phpize && ./configure && make && make install) extensions_available: amqp: + disabled: [7.3] 7.2: type: pecl run_dep: [librabbitmq4] @@ -579,6 +588,11 @@ extensions_available: 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.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] all: type: builtin pre: ln -s /usr/lib/x86_64-linux-gnu/libXpm.* /usr/lib/ @@ -611,6 +625,9 @@ extensions_available: 7.2: type: pecl run_dep: [libmagickwand-6.q16-3] + 7.3: + type: pecl + run_dep: [libmagickwand-6.q16-3] all: type: pecl build_dep: [libmagickwand-dev] @@ -631,6 +648,9 @@ extensions_available: 7.2: type: builtin run_dep: [libicu57] + 7.3: + type: builtin + run_dep: [libicu57] all: type: builtin build_dep: [libicu-dev] @@ -650,17 +670,22 @@ extensions_available: libxml: disabled: "{{ php_all_versions }}" # Available by default mbstring: + disabled: [7.3] all: type: builtin mcrypt: 7.2: type: pecl version: 1.0.1 + 7.3: + type: pecl + version: 1.0.1 all: type: builtin run_dep: [libmcrypt4] build_dep: [libmcrypt-dev] memcache: + disabled: [7.3] 7.0: type: git git_url: https://github.com/websupport-sk/pecl-memcache @@ -689,12 +714,17 @@ extensions_available: 5.6: type: pecl version: 2.2.0 + 7.3: + type: git + git_url: https://github.com/php-memcached-dev/php-memcached + git_ref: master + command: phpize && ./configure --enable-memcached && make && make install all: type: pecl build_dep: [zlib1g-dev, libmemcached-dev] run_dep: [libmemcachedutil2] mongo: - disabled: [7.0, 7.1, 7.2] # Deprecated + disabled: [7.0, 7.1, 7.2, 7.3] # Deprecated all: type: pecl command: yes | pecl install mongo @@ -712,6 +742,7 @@ extensions_available: type: pecl build_dep: [libssl-dev, libsasl2-dev] msgpack: + disabled: [7.3] 5.3: type: pecl version: 0.5.7 @@ -727,7 +758,7 @@ extensions_available: all: type: pecl mysql: - disabled: [7.0, 7.1, 7.2] # Deprecated in newer versions + disabled: [7.0, 7.1, 7.2, 7.3] # Deprecated in newer versions all: type: builtin run_dep: [libmysqlclient18] @@ -796,6 +827,7 @@ extensions_available: build_dep: [libpq-dev] run_dep: [libpq5] phalcon: + disabled: [7.3] 5.3: type: git git_url: https://github.com/phalcon/cphalcon @@ -806,6 +838,12 @@ extensions_available: git_url: https://github.com/phalcon/cphalcon git_ref: phalcon-v2.0.13 command: cd build && ./install +# 7.3: +# type: git +# git_url: https://github.com/phalcon/cphalcon +# git_ref: $(git for-each-ref --format='%(*creatordate:raw)%(creatordate:raw) %(refname)' refs/tags | sort -n | tail -1 | sed 's/^.*tags\///g') +# # TODO: Workaround to make it compile on PHP 7.3 +# command: cd build && echo > php7/64bits/phalcon.zep.c && ./install all: type: git git_url: https://github.com/phalcon/cphalcon @@ -870,6 +908,9 @@ extensions_available: 7.2: type: builtin build_dep: [libsodium-dev] + 7.3: + type: builtin + build_dep: [libsodium-dev] spl: disabled: "{{ php_all_versions }}" # TODO: Did not work swoole: @@ -888,6 +929,9 @@ extensions_available: 7.2: type: pecl run_dep: [libnghttp2-14] + 7.3: + type: pecl + run_dep: [libnghttp2-14] all: type: pecl build_dep: [libnghttp2-dev, libssl-dev] @@ -905,6 +949,9 @@ extensions_available: 7.2: type: builtin run_dep: [libtidy5] + 7.3: + type: builtin + run_dep: [libtidy5] all: type: builtin build_dep: [libtidy-dev] @@ -925,6 +972,10 @@ extensions_available: type: git git_url: https://github.com/php/pecl-php-uploadprogress configure: --enable-uploadprogress + 7.3: + type: git + git_url: https://github.com/php/pecl-php-uploadprogress + configure: --enable-uploadprogress all: type: pecl wddx: @@ -933,6 +984,7 @@ extensions_available: configure: --with-libxml-dir=/usr build_dep: [libxml2-dev] xdebug: + disabled: [7.3] 5.3: type: pecl version: 2.2.7 @@ -953,7 +1005,7 @@ extensions_available: configure: --with-libxml-dir=/usr build_dep: [libxml2-dev] xmlreader: - disabled: [7.0, 7.1, 7.2] # Available by default + disabled: [7.0, 7.1, 7.2, 7.3] # Available by default all: type: builtin configure: --with-libxml-dir=/usr @@ -992,6 +1044,9 @@ extensions_available: 7.2: type: builtin run_dep: [libzip4] + 7.3: + type: builtin + run_dep: [libzip4] all: type: builtin configure: --with-zlib-dir=/usr --with-pcre-dir=/usr --with-libzip diff --git a/build/ansible/inventory b/build/ansible/inventory index e56ea58d..da44bebb 100644 --- a/build/ansible/inventory +++ b/build/ansible/inventory @@ -6,3 +6,4 @@ php-5.6 php_version=5.6 ansible_connection=local php-7.0 php_version=7.0 ansible_connection=local php-7.1 php_version=7.1 ansible_connection=local php-7.2 php_version=7.2 ansible_connection=local +php-7.3 php_version=7.3 ansible_connection=local diff --git a/build/gen-readme.sh b/build/gen-readme.sh index 245b5e08..4a1ae802 100755 --- a/build/gen-readme.sh +++ b/build/gen-readme.sh @@ -21,6 +21,7 @@ print_usage() { echo " gen-readme.sh 7.0" echo " gen-readme.sh 7.1" echo " gen-readme.sh 7.2" + echo " gen-readme.sh 7.3" } @@ -69,6 +70,7 @@ if [ "${#}" -eq "0" ]; then update_readme "7.0" update_readme "7.1" update_readme "7.2" + update_readme "7.3" elif [ "${#}" -gt "1" ]; then # Specifying more than 1 argument is wrong echo "Error, invalid number of arguments." @@ -81,7 +83,8 @@ else && [ "${1}" != "5.6" ] \ && [ "${1}" != "7.0" ] \ && [ "${1}" != "7.1" ] \ - && [ "${1}" != "7.2" ]; then + && [ "${1}" != "7.2" ] \ + && [ "${1}" != "7.3" ]; then # Argument does not match any of the PHP versions echo "Error, invalid argument." print_usage From a40f3a4307039a03a57df9923895dfce002ebf86 Mon Sep 17 00:00:00 2001 From: cytopia Date: Mon, 14 May 2018 09:59:46 +0200 Subject: [PATCH 2/2] Update PHP modules --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 952d263f..af402cba 100644 --- a/README.md +++ b/README.md @@ -504,7 +504,7 @@ Check out this table to see which Docker image provides what PHP modules. 7.3 Core, ctype, curl, date, dom, fileinfo, filter, ftp, hash, iconv, json, libxml, mbstring, mysqlnd, openssl, pcre, PDO, pdo_sqlite, Phar, posix, readline, Reflection, session, SimpleXML, sodium, SPL, sqlite3, standard, tokenizer, xml, xmlreader, xmlwriter, zlib - apcu, bcmath, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imagick, imap, interbase, intl, json, ldap, libxml, mbstring, mcrypt, mongodb, mysqli, mysqlnd, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, pspell, readline, recode, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, sodium, SPL, sqlite3, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, wddx, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib + apcu, bcmath, bz2, calendar, Core, ctype, curl, date, dba, dom, enchant, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imagick, imap, interbase, intl, json, ldap, libxml, mbstring, mcrypt, memcached, mongodb, mysqli, mysqlnd, openssl, pcntl, pcre, PDO, pdo_dblib, PDO_Firebird, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, pspell, readline, recode, redis, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, sodium, SPL, sqlite3, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, wddx, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib