Compare commits

...

46 Commits
0.8 ... 0.22

Author SHA1 Message Date
cytopia
5751f9ae96 Merge pull request #33 from devilbox/release-0.22
Add tool: Codeception
2018-07-20 18:58:57 +02:00
cytopia
72b675fa2a Add tool: Codeception 2018-07-20 16:23:35 +02:00
cytopia
1c867e1cfc Merge pull request #32 from Tuurlijk/master
Add mhsendmail for optional mailhandling by MailHog
2018-07-16 08:41:03 +02:00
Michiel Roos
e3512da650 Add mhsendmail so it can be used in php.ini to enable mailhandling by MailHog 2018-07-13 22:44:06 +02:00
cytopia
b2dc2c7704 Merge pull request #31 from devilbox/release-0.21
Fix swoole for PHP 7.0
2018-06-17 23:30:56 +02:00
cytopia
a3819e9add Fix swoole for PHP 7.0 2018-06-17 19:03:47 +02:00
cytopia
c4a75f61a5 Merge pull request #29 from devilbox/release-0.20
Fix dependencies
2018-05-28 00:29:17 +02:00
cytopia
d081de866b Fix dependencies and swoole 2018-05-27 14:21:26 +02:00
cytopia
4c09729cf3 Fix dependencies 2018-05-27 13:05:17 +02:00
cytopia
c7389796b4 Merge pull request #28 from devilbox/hotfix-typo
Fix typo
2018-05-21 23:09:29 +02:00
cytopia
9398cefbe2 Fix typo 2018-05-21 23:08:43 +02:00
cytopia
a1092be181 Merge pull request #26 from devilbox/release-0.18
Add Module: IonCube
2018-05-21 19:22:22 +02:00
cytopia
42b811f068 Provide ionCube, but disabled by default 2018-05-21 13:24:29 +02:00
cytopia
6507383d94 Use curl to download ionCube 2018-05-21 09:40:05 +02:00
cytopia
85f36d7c6b Add Module: IonCube 2018-05-21 09:40:01 +02:00
cytopia
8ed060fd60 Merge pull request #27 from devilbox/release-0.19
Feature: Disable PHP modules
2018-05-21 09:38:35 +02:00
cytopia
a4924537de Feature: Disable PHP modules 2018-05-20 16:43:44 +02:00
cytopia
de3b0dcc17 Merge pull request #25 from devilbox/release-0.17
Trust custom certificates/CA if you choose to
2018-05-16 18:08:58 +02:00
cytopia
920d656cc1 Merge pull request #24 from devilbox/release-0.16
Add PhotonCMS binary
2018-05-16 08:29:58 +02:00
cytopia
41581bf9a3 Disable photon in PHP 5.3/5.4 2018-05-15 13:23:24 +02:00
cytopia
aab7599eab Use latest photon version without fixing 2018-05-15 10:30:39 +02:00
cytopia
16c113d404 Fix photon version check 2018-05-15 09:03:28 +02:00
cytopia
90458c9b29 Trust custom certificates/CA if you choose to 2018-05-15 08:32:53 +02:00
cytopia
7c498fd369 Fix photon cli installation 2018-05-15 00:27:51 +02:00
cytopia
9ee2da9fa3 Add photon binary 2018-05-14 21:34:31 +02:00
cytopia
1df74274a1 Merge pull request #23 from devilbox/release-0.15
Fix PHP 7.3
2018-05-14 21:29:23 +02:00
cytopia
182eda1f05 Fix PHP 7.3 2018-05-14 20:15:46 +02:00
cytopia
44e365b14c Merge pull request #22 from devilbox/release-0.14
New container: PHP 7.3
2018-05-14 14:40:37 +02:00
cytopia
a40f3a4307 Update PHP modules 2018-05-14 09:59:46 +02:00
cytopia
9d8167ca77 New container: PHP 7.3 2018-05-13 17:54:09 +02:00
cytopia
b34ad1daae Merge pull request #20 from devilbox/release-0.13
New container: PHP 5.3
2018-05-12 17:40:54 +02:00
cytopia
bdcbee385d Fix PHP-FPM 5.3 env variables 2018-05-12 15:39:13 +02:00
cytopia
f5bdccca57 New container: PHP 5.3 2018-05-12 13:54:38 +02:00
cytopia
3361ca6ea3 Merge pull request #18 from devilbox/add-php-modules
Add PHP modules
2018-05-05 15:46:33 +02:00
cytopia
e4a2f320cc Add PHP modules 2018-05-05 13:54:55 +02:00
cytopia
ae1b9f3551 Merge pull request #17 from devilbox/spelling-errors
Fix spelling error
2018-05-03 13:08:00 +02:00
cytopia
bb55aa1d8e Fix spelling error 2018-05-03 09:15:58 +02:00
cytopia
e2e2726e66 Merge pull request #16 from devilbox/release-0.12
Release 0.12
2018-04-28 12:19:44 +02:00
cytopia
7e35dd8990 Add Release badge 2018-04-28 10:30:12 +02:00
cytopia
25953b844d Fix #15 Add ssh binary 2018-04-28 10:29:56 +02:00
cytopia
2f681bc554 Merge pull request #14 from devilbox/release-0.11
Finalize README
2018-04-21 13:57:22 +02:00
cytopia
48227f54d6 Merge pull request #13 from devilbox/release-0.10
Fix #10 WDSL via SOAP directory permissions
2018-04-21 13:19:47 +02:00
cytopia
bfde73c136 Finalize README 2018-04-21 12:48:48 +02:00
cytopia
df2a62f262 Fix #10 WDSL via SOAP directory permissions 2018-04-20 16:51:25 +02:00
cytopia
41ce37529e Merge pull request #12 from devilbox/release-0.9
Fix #11 bashrc-devilbox.d not been sourced
2018-04-20 08:32:35 +02:00
cytopia
b9c2e5ff41 Fix #11 bashrc-devilbox.d not been sourced 2018-04-19 23:22:34 +02:00
44 changed files with 3553 additions and 173 deletions

View File

@@ -23,12 +23,14 @@ 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
- PHP=7.0
- PHP=7.1
- PHP=7.2
- PHP=7.3
###

View File

@@ -0,0 +1,85 @@
# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-base.j2 instead.
FROM devilbox/php-fpm-5.3
MAINTAINER "cytopia" <cytopia@everythingcli.org>
###
### 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"]

View File

@@ -46,7 +46,11 @@ RUN set -x \
###
RUN set -x \
&& rm -rf /usr/local/etc/php-fpm.d \
&& mkdir -p /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
###

View File

@@ -46,7 +46,11 @@ RUN set -x \
###
RUN set -x \
&& rm -rf /usr/local/etc/php-fpm.d \
&& mkdir -p /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
###

View File

@@ -46,7 +46,11 @@ RUN set -x \
###
RUN set -x \
&& rm -rf /usr/local/etc/php-fpm.d \
&& mkdir -p /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
###

View File

@@ -46,7 +46,11 @@ RUN set -x \
###
RUN set -x \
&& rm -rf /usr/local/etc/php-fpm.d \
&& mkdir -p /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
###

View File

@@ -46,7 +46,11 @@ RUN set -x \
###
RUN set -x \
&& rm -rf /usr/local/etc/php-fpm.d \
&& mkdir -p /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
###

View File

@@ -46,7 +46,11 @@ RUN set -x \
###
RUN set -x \
&& rm -rf /usr/local/etc/php-fpm.d \
&& mkdir -p /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
###

View File

@@ -0,0 +1,84 @@
# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-base.j2 instead.
FROM devilbox/php-fpm-7.3
MAINTAINER "cytopia" <cytopia@everythingcli.org>
###
### 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"]

View File

@@ -62,6 +62,8 @@ set_uid() {
log "info" "Changing user '${username}' uid to: ${uid}" "${debug}"
run "usermod -u ${uid} ${username}" "${debug}"
run "chown -R ${username} ${homedir}" "${debug}"
run "chown -R ${username} /var/lib/php/session" "${debug}"
run "chown -R ${username} /var/lib/php/wsdlcache" "${debug}"
fi
fi
}
@@ -102,6 +104,8 @@ set_gid() {
log "info" "Changing group '${groupname}' gid to: ${gid}" "${debug}"
run "groupmod -g ${gid} ${groupname}" "${debug}"
run "chown -R :${groupname} ${homedir}" "${debug}"
run "chown -R :${groupname} /var/lib/php/session" "${debug}"
run "chown -R :${groupname} /var/lib/php/wsdlcache" "${debug}"
fi
fi
}

View File

@@ -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

View File

@@ -0,0 +1,414 @@
# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-mods.j2 instead.
FROM devilbox/php-fpm:5.3-base
MAINTAINER "cytopia" <cytopia@everythingcli.org>
###
### 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} \
\
\
&& EXTENSION_DIR="$( php -i | grep ^extension_dir | awk -F '=>' '{print $2}' | xargs )" \
&& if [ ! -d "${EXTENSION_DIR}" ]; then mkdir -p "${EXTENSION_DIR}"; fi \
&& curl https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz -L -o ioncube.tar.gz \
&& tar xvfz ioncube.tar.gz \
&& cd ioncube \
&& cp "ioncube_loader_lin_5.3.so" "${EXTENSION_DIR}/ioncube.so" \
&& cd ../ \
&& rm -rf ioncube \
&& rm -rf ioncube.tar.gz \
\
&& 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"]

View File

@@ -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 \
@@ -114,6 +116,16 @@ RUN set -x \
${BUILD_DEPS} \
\
\
&& EXTENSION_DIR="$( php -i | grep ^extension_dir | awk -F '=>' '{print $2}' | xargs )" \
&& if [ ! -d "${EXTENSION_DIR}" ]; then mkdir -p "${EXTENSION_DIR}"; fi \
&& curl https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz -L -o ioncube.tar.gz \
&& tar xvfz ioncube.tar.gz \
&& cd ioncube \
&& cp "ioncube_loader_lin_5.4.so" "${EXTENSION_DIR}/ioncube.so" \
&& cd ../ \
&& rm -rf ioncube \
&& rm -rf ioncube.tar.gz \
\
&& echo "/usr" | pecl install amqp \
&& docker-php-ext-enable amqp \
&& pecl install apcu-4.0.11 \

View File

@@ -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 \
@@ -116,6 +118,16 @@ RUN set -x \
${BUILD_DEPS} \
\
\
&& EXTENSION_DIR="$( php -i | grep ^extension_dir | awk -F '=>' '{print $2}' | xargs )" \
&& if [ ! -d "${EXTENSION_DIR}" ]; then mkdir -p "${EXTENSION_DIR}"; fi \
&& curl https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz -L -o ioncube.tar.gz \
&& tar xvfz ioncube.tar.gz \
&& cd ioncube \
&& cp "ioncube_loader_lin_5.5.so" "${EXTENSION_DIR}/ioncube.so" \
&& cd ../ \
&& rm -rf ioncube \
&& rm -rf ioncube.tar.gz \
\
&& echo "/usr" | pecl install amqp \
&& docker-php-ext-enable amqp \
&& pecl install apcu-4.0.11 \

View File

@@ -30,6 +30,7 @@ ENV BUILD_DEPS \
libvpx-dev \
zlib1g-dev \
libfreetype6-dev \
libwebp-dev \
libgmp-dev \
libmagickwand-dev \
libc-client-dev \
@@ -48,6 +49,7 @@ ENV BUILD_DEPS \
libssl-dev \
libsasl2-dev \
libssl-dev \
libsasl2-dev \
freetds-dev \
libfbclient2 \
libib-util \
@@ -56,7 +58,6 @@ ENV BUILD_DEPS \
libpq-dev \
libsqlite3-dev \
libpq-dev \
libssl-dev \
libpspell-dev \
libedit-dev \
libreadline-dev \
@@ -82,19 +83,21 @@ ENV BUILD_DEPS \
git
ENV RUN_DEPS \
librabbitmq1 \
librabbitmq4 \
libenchant1c2a \
libpng12-0 \
libpng16-16 \
libjpeg62-turbo \
libxpm4 \
libvpx1 \
libvpx4 \
libfreetype6 \
libmagickwand-6.q16-2 \
libwebp6 \
libmagickwand-6.q16-3 \
libc-client2007e \
libfbclient2 \
libicu52 \
libicu57 \
libmcrypt4 \
libmemcachedutil2 \
libmariadbclient18 \
libsybdb5 \
libfbclient2 \
libpq5 \
@@ -102,10 +105,10 @@ ENV RUN_DEPS \
libaspell15 \
librecode0 \
snmp \
libnghttp2-5 \
libtidy-0.99-0 \
libnghttp2-14 \
libtidy5 \
libxslt1.1 \
libzip2 \
libzip4 \
ca-certificates
@@ -118,6 +121,16 @@ RUN set -x \
${BUILD_DEPS} \
\
\
&& EXTENSION_DIR="$( php -i | grep ^extension_dir | awk -F '=>' '{print $2}' | xargs )" \
&& if [ ! -d "${EXTENSION_DIR}" ]; then mkdir -p "${EXTENSION_DIR}"; fi \
&& curl https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz -L -o ioncube.tar.gz \
&& tar xvfz ioncube.tar.gz \
&& cd ioncube \
&& cp "ioncube_loader_lin_5.6.so" "${EXTENSION_DIR}/ioncube.so" \
&& cd ../ \
&& rm -rf ioncube \
&& rm -rf ioncube.tar.gz \
\
&& echo "/usr" | pecl install amqp \
&& docker-php-ext-enable amqp \
&& pecl install apcu-4.0.11 \
@@ -187,7 +200,6 @@ RUN set -x \
&& 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) readline \
@@ -339,8 +351,6 @@ RUN set -x \
&& 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$' \

View File

@@ -48,6 +48,7 @@ ENV BUILD_DEPS \
zlib1g-dev \
libmemcached-dev \
libssl-dev \
libsasl2-dev \
freetds-dev \
libfbclient2 \
libib-util \
@@ -80,18 +81,18 @@ ENV BUILD_DEPS \
git
ENV RUN_DEPS \
librabbitmq1 \
librabbitmq4 \
libenchant1c2a \
libpng12-0 \
libpng16-16 \
libjpeg62-turbo \
libxpm4 \
libvpx1 \
libvpx4 \
libfreetype6 \
libwebp-dev \
libmagickwand-6.q16-2 \
libwebp6 \
libmagickwand-6.q16-3 \
libc-client2007e \
libfbclient2 \
libicu52 \
libicu57 \
libmcrypt4 \
libmemcachedutil2 \
libsybdb5 \
@@ -101,10 +102,10 @@ ENV RUN_DEPS \
libaspell15 \
librecode0 \
snmp \
libnghttp2-5 \
libtidy-0.99-0 \
libnghttp2-14 \
libtidy5 \
libxslt1.1 \
libzip2 \
libzip4 \
ca-certificates
@@ -117,6 +118,16 @@ RUN set -x \
${BUILD_DEPS} \
\
\
&& EXTENSION_DIR="$( php -i | grep ^extension_dir | awk -F '=>' '{print $2}' | xargs )" \
&& if [ ! -d "${EXTENSION_DIR}" ]; then mkdir -p "${EXTENSION_DIR}"; fi \
&& curl https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz -L -o ioncube.tar.gz \
&& tar xvfz ioncube.tar.gz \
&& cd ioncube \
&& cp "ioncube_loader_lin_7.0.so" "${EXTENSION_DIR}/ioncube.so" \
&& cd ../ \
&& rm -rf ioncube \
&& rm -rf ioncube.tar.gz \
\
&& echo "/usr" | pecl install amqp \
&& docker-php-ext-enable amqp \
&& pecl install apcu \
@@ -204,7 +215,7 @@ RUN set -x \
&& /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 \
&& pecl install swoole-2.2.0 \
&& 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 \

View File

@@ -47,6 +47,7 @@ ENV BUILD_DEPS \
zlib1g-dev \
libmemcached-dev \
libssl-dev \
libsasl2-dev \
freetds-dev \
libfbclient2 \
libib-util \
@@ -80,18 +81,18 @@ ENV BUILD_DEPS \
git
ENV RUN_DEPS \
librabbitmq1 \
librabbitmq4 \
libenchant1c2a \
libpng12-0 \
libpng16-16 \
libjpeg62-turbo \
libxpm4 \
libvpx1 \
libvpx4 \
libfreetype6 \
libwebp-dev \
libmagickwand-6.q16-2 \
libwebp6 \
libmagickwand-6.q16-3 \
libc-client2007e \
libfbclient2 \
libicu52 \
libicu57 \
libmcrypt4 \
libmemcachedutil2 \
libsybdb5 \
@@ -101,10 +102,10 @@ ENV RUN_DEPS \
libaspell15 \
librecode0 \
snmp \
libnghttp2-5 \
libtidy-0.99-0 \
libnghttp2-14 \
libtidy5 \
libxslt1.1 \
libzip2 \
libzip4 \
ca-certificates
@@ -117,6 +118,16 @@ RUN set -x \
${BUILD_DEPS} \
\
\
&& EXTENSION_DIR="$( php -i | grep ^extension_dir | awk -F '=>' '{print $2}' | xargs )" \
&& if [ ! -d "${EXTENSION_DIR}" ]; then mkdir -p "${EXTENSION_DIR}"; fi \
&& curl https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz -L -o ioncube.tar.gz \
&& tar xvfz ioncube.tar.gz \
&& cd ioncube \
&& cp "ioncube_loader_lin_7.1.so" "${EXTENSION_DIR}/ioncube.so" \
&& cd ../ \
&& rm -rf ioncube \
&& rm -rf ioncube.tar.gz \
\
&& echo "/usr" | pecl install amqp \
&& docker-php-ext-enable amqp \
&& pecl install apcu \

View File

@@ -47,6 +47,7 @@ ENV BUILD_DEPS \
zlib1g-dev \
libmemcached-dev \
libssl-dev \
libsasl2-dev \
freetds-dev \
libfbclient2 \
libib-util \
@@ -118,7 +119,17 @@ RUN set -x \
${BUILD_DEPS} \
\
\
&& pecl install amqp \
&& EXTENSION_DIR="$( php -i | grep ^extension_dir | awk -F '=>' '{print $2}' | xargs )" \
&& if [ ! -d "${EXTENSION_DIR}" ]; then mkdir -p "${EXTENSION_DIR}"; fi \
&& curl https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz -L -o ioncube.tar.gz \
&& tar xvfz ioncube.tar.gz \
&& cd ioncube \
&& cp "ioncube_loader_lin_7.2.so" "${EXTENSION_DIR}/ioncube.so" \
&& cd ../ \
&& rm -rf ioncube \
&& rm -rf ioncube.tar.gz \
\
&& echo "/usr" | pecl install amqp \
&& docker-php-ext-enable amqp \
&& pecl install apcu \
&& docker-php-ext-enable apcu \
@@ -235,6 +246,7 @@ RUN set -x \
&& /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 --with-libzip \
&& /usr/local/bin/docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) zip \
\
\

View File

@@ -0,0 +1,421 @@
# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-mods.j2 instead.
FROM devilbox/php-fpm:7.3-base
MAINTAINER "cytopia" <cytopia@everythingcli.org>
###
### 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 \
libhiredis-dev \
cmake \
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 \
libhiredis0.13 \
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 -j$(getconf _NPROCESSORS_ONLN) && 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 \
&& git clone -v https://github.com/swoole/swoole-src /tmp/swoole \
&& cd /tmp/swoole \
&& git checkout master \
&& git submodule update --init --recursive \
&& cd thirdparty/hiredis \
&& make -j$(getconf _NPROCESSORS_ONLN) \
&& make install \
&& cd ../nghttp2 \
&& cmake . \
&& make install \
&& ldconfig \
&& cd ../.. \
&& phpize \
&& ./configure \
--enable-async-redis \
--enable-openssl \
--enable-thread \
--enable-swoole \
--enable-swoole-static \
--with-swoole \
--with-openssl-dir=/usr \
--enable-mysqlnd \
--enable-coroutine \
--enable-picohttpparser \
#`--enable-timewheel` \
#`--enable-hugepage` \
#`--enable-asan` \
#`--with-phpx-dir=` \
#`--with-jemalloc-dir=/usr/include/jemalloc` \
#`--enable-coroutine-postgresql` \
#`--enable-http2` \
#`--enable-sockets` \
#`--with-libpq-dir=/usr/include/postgresql/libpq/` \
&& make -j$(getconf _NPROCESSORS_ONLN) \
&& make install \
\
&& docker-php-ext-enable swoole \
&& cd / && rm -rf /tmp/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-configure zip --with-zlib-dir=/usr --with-pcre-dir=/usr --with-libzip \
&& /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"]

View File

@@ -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" <cytopia@everythingcli.org>
###
### 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"]

View File

@@ -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" <cytopia@everythingcli.org>
###
### 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"]

View File

@@ -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
}

View File

@@ -0,0 +1,51 @@
#!/usr/bin/env bash
set -e
set -u
set -o pipefail
############################################################
# Functions
############################################################
###
### Enable PHP Modules
###
enable_modules() {
local mod_varname="${1}"
local debug="${2}"
local cfg_path="/usr/local/etc/php/conf.d"
local mod_path=
mod_path="$( php -i | grep ^extension_dir | awk -F '=>' '{print $2}' | xargs )"
if ! env_set "${mod_varname}"; then
log "info" "\$${mod_varname} not set. Not enabling any PHP modules." "${debug}"
else
mods="$( env_get "${mod_varname}" )"
if [ -z "${mods}" ]; then
log "info" "\$${mod_varname} set, but empty. Not enabling any PHP modules." "${debug}"
else
log "info" "Enabling the following PHP modules: ${mods}" "${debug}"
fi
while read -r mod; do
mod="$( echo "${mod}" | xargs )" # trim
# Does the module exist?
if [ -f "${mod_path}/${mod}.so" ]; then
# Exceptions to load speficially
if [ "${mod}" = "ioncube" ]; then
run "echo 'zend_extension=${mod_path}/ioncube.so' > '${cfg_path}/docker-ext-php-ext-ioncube.ini'" "${debug}"
# Generic Load
else
run "docker-php-ext-enable ${mod} || true" "${debug}"
fi
else
log "warn" "Enabling PHP Module: '${mod}' does not exist" "${debug}"
fi
done <<< "$( echo "${mods}" | tr ',' '\n' )"
fi
}

View File

@@ -0,0 +1,47 @@
#!/usr/bin/env bash
set -e
set -u
set -o pipefail
############################################################
# Functions
############################################################
###
### Disable PHP Modules
###
disable_modules() {
local mod_varname="${1}"
local debug="${2}"
local cfg_path="/usr/local/etc/php/conf.d"
if ! env_set "${mod_varname}"; then
log "info" "\$${mod_varname} not set. Not disabling any PHP modules." "${debug}"
else
mods="$( env_get "${mod_varname}" )"
if [ -z "${mods}" ]; then
log "info" "\$${mod_varname} set, but empty. Not disabling any PHP modules." "${debug}"
else
log "info" "Disabling the following PHP modules: ${mods}" "${debug}"
fi
while read -r mod; do
mod="$( echo "${mod}" | xargs )" # trim
# Find all config files that enable that module
files="$( grep -Er "^(zend_)?extension.*(=|/)${mod}\.so" "${cfg_path}" || true )"
if [ -n "${files}" ]; then
while read -r f; do
# Get filename
f="$( echo "${f}" | awk -F':' '{ print $1 }' )"
# Remove file
run "rm ${f}" "${debug}"
done <<< "${files}"
fi
done <<< "$( echo "${mods}" | tr ',' '\n' )"
fi
}

View File

@@ -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
###
@@ -152,6 +160,18 @@ copy_ini_files "${PHP_CUST_INI_DIR}" "${PHP_INI_DIR}" "${DEBUG_LEVEL}"
copy_fpm_files "${PHP_CUST_FPM_DIR}" "${PHP_FPM_DIR}" "${DEBUG_LEVEL}"
###
### Enable PHP Modules
###
enable_modules "ENABLE_MODULES" "${DEBUG_LEVEL}"
###
### Disable PHP Modules
###
disable_modules "DISABLE_MODULES" "${DEBUG_LEVEL}"
###
### Startup
###

View File

@@ -0,0 +1,325 @@
# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-work.j2 instead.
FROM devilbox/php-fpm:5.3-prod
MAINTAINER "cytopia" <cytopia@everythingcli.org>
###
### 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 \
\
# codeception
&& COMPOSER_HOME="/usr/local/src/composer" composer global require codeception/codeception --dev \
&& ln -s /usr/local/src/composer/vendor/codeception/codeception/codecept /usr/local/bin/codecept \
\
# 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' \
\
# mhsendmail
&& wget https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 \
&& chmod +x mhsendmail_linux_amd64 \
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmai \
\
# 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]+' \
\
&& codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[.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"]

View File

@@ -71,6 +71,7 @@ RUN set -x \
net-tools \
netcat \
nodejs \
openssh-client \
postgresql-client \
python-pip \
redis-tools \
@@ -111,6 +112,10 @@ RUN set -x \
&& npm install -g mdlint \
&& npm install -g gulp \
\
# codeception
&& COMPOSER_HOME="/usr/local/src/composer" composer global require codeception/codeception --dev \
&& ln -s /usr/local/src/composer/vendor/codeception/codeception/codecept /usr/local/bin/codecept \
\
# drush
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush \
&& cd /usr/local/src/drush \
@@ -155,6 +160,11 @@ RUN set -x \
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew update' \
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew config' \
\
# mhsendmail
&& wget https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 \
&& chmod +x mhsendmail_linux_amd64 \
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmai \
\
# mysqldumpsecure
&& git clone https://github.com/cytopia/mysqldump-secure.git /usr/local/src/mysqldump-secure \
&& cd /usr/local/src/mysqldump-secure \
@@ -242,8 +252,8 @@ 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/bash-custom.d/ ]; then"; \
echo " for f in /etc/bash-custom.d/*.sh ; do"; \
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"; \
@@ -272,6 +282,7 @@ RUN set -x \
&& mdlint --version | grep -E '[.0-9]+' \
&& gulp --version | grep -E '[.0-9]+' \
\
&& codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[.0-9]+$' \
&& drush --version | grep -E '[.0-9]+' \
&& git-flow version | grep -E '[.0-9]+' \
&& grunt --version | grep -E '[.0-9]+' \
@@ -302,7 +313,7 @@ COPY ./data/sudo-devilbox /etc/sudoers.d/devilbox
###
### Volumes
###
VOLUME /etc/bash-custom.d
VOLUME /etc/bashrc-devilbox.d
VOLUME /etc/php-custom.d
VOLUME /etc/php-fpm-custom.d
VOLUME /etc/php-modules.d

View File

@@ -71,6 +71,7 @@ RUN set -x \
net-tools \
netcat \
nodejs \
openssh-client \
postgresql-client \
python-pip \
redis-tools \
@@ -111,6 +112,10 @@ RUN set -x \
&& npm install -g mdlint \
&& npm install -g gulp \
\
# codeception
&& COMPOSER_HOME="/usr/local/src/composer" composer global require codeception/codeception --dev \
&& ln -s /usr/local/src/composer/vendor/codeception/codeception/codecept /usr/local/bin/codecept \
\
# drush
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush \
&& cd /usr/local/src/drush \
@@ -158,6 +163,11 @@ RUN set -x \
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew update' \
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew config' \
\
# mhsendmail
&& wget https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 \
&& chmod +x mhsendmail_linux_amd64 \
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmai \
\
# mysqldumpsecure
&& git clone https://github.com/cytopia/mysqldump-secure.git /usr/local/src/mysqldump-secure \
&& cd /usr/local/src/mysqldump-secure \
@@ -199,6 +209,10 @@ RUN set -x \
&& curl -q https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \
&& chmod +x /usr/local/bin/phpcbf \
\
# photon
&& COMPOSER_HOME="/usr/local/src/composer" composer global require "photoncms/installer" \
&& ln -s /usr/local/src/composer/vendor/photoncms/installer/photon /usr/local/bin/photon \
\
# sass
&& gem install sass \
# symfony
@@ -245,8 +259,8 @@ 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/bash-custom.d/ ]; then"; \
echo " for f in /etc/bash-custom.d/*.sh ; do"; \
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"; \
@@ -275,6 +289,7 @@ RUN set -x \
&& mdlint --version | grep -E '[.0-9]+' \
&& gulp --version | grep -E '[.0-9]+' \
\
&& codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[.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]+' \
@@ -285,6 +300,7 @@ RUN set -x \
&& phalcon commands | grep -E '[.0-9]+' \
&& phpcs --version | grep -E 'version [.0-9]+' \
&& phpcbf --version | grep -E 'version [.0-9]+' \
&& photon --version | grep -E 'Installer [.0-9]+' \
&& sass --version | grep -E '[.0-9]+' \
&& symfony --version | grep -E 'version\s*[.0-9]+' \
&& webpack --version | grep -E '[.0-9]+' \
@@ -306,7 +322,7 @@ COPY ./data/sudo-devilbox /etc/sudoers.d/devilbox
###
### Volumes
###
VOLUME /etc/bash-custom.d
VOLUME /etc/bashrc-devilbox.d
VOLUME /etc/php-custom.d
VOLUME /etc/php-fpm-custom.d
VOLUME /etc/php-modules.d

View File

@@ -71,6 +71,7 @@ RUN set -x \
net-tools \
netcat \
nodejs \
openssh-client \
postgresql-client \
python-pip \
redis-tools \
@@ -111,6 +112,10 @@ RUN set -x \
&& npm install -g mdlint \
&& npm install -g gulp \
\
# codeception
&& COMPOSER_HOME="/usr/local/src/composer" composer global require codeception/codeception --dev \
&& ln -s /usr/local/src/composer/vendor/codeception/codeception/codecept /usr/local/bin/codecept \
\
# drush
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush \
&& cd /usr/local/src/drush \
@@ -158,6 +163,11 @@ RUN set -x \
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew update' \
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew config' \
\
# mhsendmail
&& wget https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 \
&& chmod +x mhsendmail_linux_amd64 \
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmai \
\
# mysqldumpsecure
&& git clone https://github.com/cytopia/mysqldump-secure.git /usr/local/src/mysqldump-secure \
&& cd /usr/local/src/mysqldump-secure \
@@ -199,6 +209,10 @@ RUN set -x \
&& curl -q https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \
&& chmod +x /usr/local/bin/phpcbf \
\
# photon
&& COMPOSER_HOME="/usr/local/src/composer" composer global require "photoncms/installer" \
&& ln -s /usr/local/src/composer/vendor/photoncms/installer/photon /usr/local/bin/photon \
\
# sass
&& gem install sass \
# symfony
@@ -245,8 +259,8 @@ 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/bash-custom.d/ ]; then"; \
echo " for f in /etc/bash-custom.d/*.sh ; do"; \
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"; \
@@ -275,6 +289,7 @@ RUN set -x \
&& mdlint --version | grep -E '[.0-9]+' \
&& gulp --version | grep -E '[.0-9]+' \
\
&& codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[.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]+' \
@@ -285,6 +300,7 @@ RUN set -x \
&& phalcon commands | grep -E '[.0-9]+' \
&& phpcs --version | grep -E 'version [.0-9]+' \
&& phpcbf --version | grep -E 'version [.0-9]+' \
&& photon --version | grep -E 'Installer [.0-9]+' \
&& sass --version | grep -E '[.0-9]+' \
&& symfony --version | grep -E 'version\s*[.0-9]+' \
&& webpack --version | grep -E '[.0-9]+' \
@@ -306,7 +322,7 @@ COPY ./data/sudo-devilbox /etc/sudoers.d/devilbox
###
### Volumes
###
VOLUME /etc/bash-custom.d
VOLUME /etc/bashrc-devilbox.d
VOLUME /etc/php-custom.d
VOLUME /etc/php-fpm-custom.d
VOLUME /etc/php-modules.d

View File

@@ -71,6 +71,7 @@ RUN set -x \
net-tools \
netcat \
nodejs \
openssh-client \
postgresql-client \
python-pip \
redis-tools \
@@ -111,6 +112,10 @@ RUN set -x \
&& npm install -g mdlint \
&& npm install -g gulp \
\
# codeception
&& COMPOSER_HOME="/usr/local/src/composer" composer global require codeception/codeception --dev \
&& ln -s /usr/local/src/composer/vendor/codeception/codeception/codecept /usr/local/bin/codecept \
\
# drush
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush \
&& cd /usr/local/src/drush \
@@ -158,6 +163,11 @@ RUN set -x \
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew update' \
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew config' \
\
# mhsendmail
&& wget https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 \
&& chmod +x mhsendmail_linux_amd64 \
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmai \
\
# mysqldumpsecure
&& git clone https://github.com/cytopia/mysqldump-secure.git /usr/local/src/mysqldump-secure \
&& cd /usr/local/src/mysqldump-secure \
@@ -199,6 +209,10 @@ RUN set -x \
&& curl -q https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \
&& chmod +x /usr/local/bin/phpcbf \
\
# photon
&& COMPOSER_HOME="/usr/local/src/composer" composer global require "photoncms/installer" \
&& ln -s /usr/local/src/composer/vendor/photoncms/installer/photon /usr/local/bin/photon \
\
# sass
&& gem install sass \
# symfony
@@ -245,8 +259,8 @@ 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/bash-custom.d/ ]; then"; \
echo " for f in /etc/bash-custom.d/*.sh ; do"; \
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"; \
@@ -275,6 +289,7 @@ RUN set -x \
&& mdlint --version | grep -E '[.0-9]+' \
&& gulp --version | grep -E '[.0-9]+' \
\
&& codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[.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]+' \
@@ -285,6 +300,7 @@ RUN set -x \
&& phalcon commands | grep -E '[.0-9]+' \
&& phpcs --version | grep -E 'version [.0-9]+' \
&& phpcbf --version | grep -E 'version [.0-9]+' \
&& photon --version | grep -E 'Installer [.0-9]+' \
&& sass --version | grep -E '[.0-9]+' \
&& symfony --version | grep -E 'version\s*[.0-9]+' \
&& webpack --version | grep -E '[.0-9]+' \
@@ -306,7 +322,7 @@ COPY ./data/sudo-devilbox /etc/sudoers.d/devilbox
###
### Volumes
###
VOLUME /etc/bash-custom.d
VOLUME /etc/bashrc-devilbox.d
VOLUME /etc/php-custom.d
VOLUME /etc/php-fpm-custom.d
VOLUME /etc/php-modules.d

View File

@@ -71,6 +71,7 @@ RUN set -x \
net-tools \
netcat \
nodejs \
openssh-client \
postgresql-client \
python-pip \
redis-tools \
@@ -111,6 +112,10 @@ RUN set -x \
&& npm install -g mdlint \
&& npm install -g gulp \
\
# codeception
&& COMPOSER_HOME="/usr/local/src/composer" composer global require codeception/codeception --dev \
&& ln -s /usr/local/src/composer/vendor/codeception/codeception/codecept /usr/local/bin/codecept \
\
# drush
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush \
&& cd /usr/local/src/drush \
@@ -158,6 +163,11 @@ RUN set -x \
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew update' \
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew config' \
\
# mhsendmail
&& wget https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 \
&& chmod +x mhsendmail_linux_amd64 \
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmai \
\
# mysqldumpsecure
&& git clone https://github.com/cytopia/mysqldump-secure.git /usr/local/src/mysqldump-secure \
&& cd /usr/local/src/mysqldump-secure \
@@ -199,6 +209,10 @@ RUN set -x \
&& curl -q https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \
&& chmod +x /usr/local/bin/phpcbf \
\
# photon
&& COMPOSER_HOME="/usr/local/src/composer" composer global require "photoncms/installer" \
&& ln -s /usr/local/src/composer/vendor/photoncms/installer/photon /usr/local/bin/photon \
\
# sass
&& gem install sass \
# symfony
@@ -245,8 +259,8 @@ 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/bash-custom.d/ ]; then"; \
echo " for f in /etc/bash-custom.d/*.sh ; do"; \
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"; \
@@ -275,6 +289,7 @@ RUN set -x \
&& mdlint --version | grep -E '[.0-9]+' \
&& gulp --version | grep -E '[.0-9]+' \
\
&& codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[.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]+' \
@@ -285,6 +300,7 @@ RUN set -x \
&& phalcon commands | grep -E '[.0-9]+' \
&& phpcs --version | grep -E 'version [.0-9]+' \
&& phpcbf --version | grep -E 'version [.0-9]+' \
&& photon --version | grep -E 'Installer [.0-9]+' \
&& sass --version | grep -E '[.0-9]+' \
&& symfony --version | grep -E 'version\s*[.0-9]+' \
&& webpack --version | grep -E '[.0-9]+' \
@@ -306,7 +322,7 @@ COPY ./data/sudo-devilbox /etc/sudoers.d/devilbox
###
### Volumes
###
VOLUME /etc/bash-custom.d
VOLUME /etc/bashrc-devilbox.d
VOLUME /etc/php-custom.d
VOLUME /etc/php-fpm-custom.d
VOLUME /etc/php-modules.d

View File

@@ -71,6 +71,7 @@ RUN set -x \
net-tools \
netcat \
nodejs \
openssh-client \
postgresql-client \
python-pip \
redis-tools \
@@ -111,6 +112,10 @@ RUN set -x \
&& npm install -g mdlint \
&& npm install -g gulp \
\
# codeception
&& COMPOSER_HOME="/usr/local/src/composer" composer global require codeception/codeception --dev \
&& ln -s /usr/local/src/composer/vendor/codeception/codeception/codecept /usr/local/bin/codecept \
\
# drush
&& git clone https://github.com/drush-ops/drush.git /usr/local/src/drush \
&& cd /usr/local/src/drush \
@@ -158,6 +163,11 @@ RUN set -x \
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew update' \
&& su - ${MY_USER} -c '/usr/local/src/linuxbrew/bin/brew config' \
\
# mhsendmail
&& wget https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 \
&& chmod +x mhsendmail_linux_amd64 \
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmai \
\
# mysqldumpsecure
&& git clone https://github.com/cytopia/mysqldump-secure.git /usr/local/src/mysqldump-secure \
&& cd /usr/local/src/mysqldump-secure \
@@ -199,6 +209,10 @@ RUN set -x \
&& curl -q https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \
&& chmod +x /usr/local/bin/phpcbf \
\
# photon
&& COMPOSER_HOME="/usr/local/src/composer" composer global require "photoncms/installer" \
&& ln -s /usr/local/src/composer/vendor/photoncms/installer/photon /usr/local/bin/photon \
\
# sass
&& gem install sass \
# symfony
@@ -245,8 +259,8 @@ 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/bash-custom.d/ ]; then"; \
echo " for f in /etc/bash-custom.d/*.sh ; do"; \
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"; \
@@ -275,6 +289,7 @@ RUN set -x \
&& mdlint --version | grep -E '[.0-9]+' \
&& gulp --version | grep -E '[.0-9]+' \
\
&& codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[.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]+' \
@@ -285,6 +300,7 @@ RUN set -x \
&& phalcon commands | grep -E '[.0-9]+' \
&& phpcs --version | grep -E 'version [.0-9]+' \
&& phpcbf --version | grep -E 'version [.0-9]+' \
&& photon --version | grep -E 'Installer [.0-9]+' \
&& sass --version | grep -E '[.0-9]+' \
&& symfony --version | grep -E 'version\s*[.0-9]+' \
&& webpack --version | grep -E '[.0-9]+' \
@@ -306,7 +322,7 @@ COPY ./data/sudo-devilbox /etc/sudoers.d/devilbox
###
### Volumes
###
VOLUME /etc/bash-custom.d
VOLUME /etc/bashrc-devilbox.d
VOLUME /etc/php-custom.d
VOLUME /etc/php-fpm-custom.d
VOLUME /etc/php-modules.d

View File

@@ -0,0 +1,337 @@
# Auto-generated via Ansible: edit build/ansible/DOCKERFILES/Dockerfile-work.j2 instead.
FROM devilbox/php-fpm:7.3-prod
MAINTAINER "cytopia" <cytopia@everythingcli.org>
###
### 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 \
\
# codeception
&& COMPOSER_HOME="/usr/local/src/composer" composer global require codeception/codeception --dev \
&& ln -s /usr/local/src/composer/vendor/codeception/codeception/codecept /usr/local/bin/codecept \
\
# 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' \
\
# mhsendmail
&& wget https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 \
&& chmod +x mhsendmail_linux_amd64 \
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmai \
\
# 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 \
\
# photon
&& COMPOSER_HOME="/usr/local/src/composer" composer global require "photoncms/installer" \
&& ln -s /usr/local/src/composer/vendor/photoncms/installer/photon /usr/local/bin/photon \
\
# 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]+' \
\
&& codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[.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]+' \
&& photon --version | grep -E 'Installer [.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"]

View File

@@ -34,7 +34,7 @@ echo " | Available Tools | Project website |"
echo " |------------------|------------------------------|"
echo " | awesome-ci | gh: cytopia/awesome-ci |"
echo " | composer | https://getcomposer.org |"
echo " | druapl-console | https://drupalconsole.com |"
echo " | drupal-console | https://drupalconsole.com |"
echo " | drush | http://www.drush.org |"
echo " | eslint | https://eslint.org |"
echo " | git | https://git-scm.com |"

View File

@@ -0,0 +1,26 @@
#!/usr/bin/env bash
set -e
set -u
set -o pipefail
############################################################
# Functions
############################################################
###
### Include certificates/CAs into own system
###
update_ca_certificates() {
local dir="${1}"
local debug="${2}"
if [ -d "${dir}" ]; then
for cert in $( find "${dir}" -name \*.crt ); do
name="$( basename "${cert}" )"
run "cp ${cert} /usr/local/share/ca-certificates/devilbox-${name}" "${debug}"
done
fi
run "update-ca-certificates" "${debug}"
}

View File

@@ -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
###
@@ -152,6 +160,18 @@ copy_ini_files "${PHP_CUST_INI_DIR}" "${PHP_INI_DIR}" "${DEBUG_LEVEL}"
copy_fpm_files "${PHP_CUST_FPM_DIR}" "${PHP_FPM_DIR}" "${DEBUG_LEVEL}"
###
### Enable PHP Modules
###
enable_modules "ENABLE_MODULES" "${DEBUG_LEVEL}"
###
### Disable PHP Modules
###
disable_modules "DISABLE_MODULES" "${DEBUG_LEVEL}"
###
### mysqldump-secure
###
@@ -174,6 +194,12 @@ run "chmod 0755 /shared/backups" "${DEBUG_LEVEL}"
run "chmod 0755 /shared/httpd" "${DEBUG_LEVEL}"
###
### Update ca-certificates
###
update_ca_certificates "/ca" "${DEBUG_LEVEL}"
###
### Startup
###

View File

@@ -27,61 +27,77 @@ 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"
@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"
@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"
@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"
@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"
@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"
@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"
@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"
@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"
@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"
@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"
@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"
@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"
@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"
@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"
@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"
@@ -117,21 +133,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-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-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-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
###
### 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
@@ -144,7 +162,11 @@ 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
build-mods-54:
docker build -t devilbox/php-fpm:5.4-mods -f $(location)/mods/Dockerfile-5.4 $(location)/mods
build-mods-55:
@@ -157,7 +179,11 @@ 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
build-prod-54:
docker build -t devilbox/php-fpm:5.4-prod -f $(location)/prod/Dockerfile-5.4 $(location)/prod
build-prod-55:
@@ -170,7 +196,11 @@ 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
build-work-54:
docker build -t devilbox/php-fpm:5.4-work -f $(location)/work/Dockerfile-5.4 $(location)/work
build-work-55:
@@ -183,12 +213,16 @@ 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
###
### 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
@@ -201,7 +235,11 @@ 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
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:
@@ -214,7 +252,11 @@ 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
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:
@@ -227,7 +269,11 @@ 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
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:
@@ -240,12 +286,16 @@ 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
###
### 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:
@@ -258,12 +308,16 @@ 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)
###
### Tests
###
test-base-53:
./tests/test.sh 5.3 base
test-base-54:
./tests/test.sh 5.4 base
test-base-55:
@@ -276,7 +330,11 @@ 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
test-mods-54:
./tests/test.sh 5.4 mods
test-mods-55:
@@ -289,7 +347,11 @@ 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
test-prod-54:
./tests/test.sh 5.4 prod
test-prod-55:
@@ -302,7 +364,11 @@ 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
test-work-54:
./tests/test.sh 5.4 work
test-work-55:
@@ -315,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

923
README.md
View File

@@ -1,11 +1,581 @@
# Docker PHP-FPM images
# PHP-FPM Docker images
<h2><img id="options" width="20" src="https://github.com/devilbox/artwork/raw/master/submissions_logo/cytopia/01/png/logo_64_trans.png"> Options</h2>
[![Build Status](https://travis-ci.org/devilbox/docker-php-fpm.svg?branch=master)](https://travis-ci.org/devilbox/docker-php-fpm)
[![release](https://img.shields.io/github/release/devilbox/docker-php-fpm.svg)](https://github.com/devilbox/docker-php-fpm/releases)
[![Join the chat at https://gitter.im/devilbox/Lobby](https://badges.gitter.im/devilbox/Lobby.svg)](https://gitter.im/devilbox/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Github](https://img.shields.io/badge/github-docker--php--fpm-red.svg)](https://github.com/devilbox/docker-php-fpm)
[![](https://images.microbadger.com/badges/license/devilbox/php-fpm.svg)](https://microbadger.com/images/devilbox/php-fpm "php-fpm")
### Environment variables
**[devilbox/docker-php-fpm](https://github.com/devilbox/docker-php-fpm)**
This repository will provide you fully functional PHP-FPM Docker images in different flavours,
versions and packed with different types of integrated PHP modules. It also solves the problem of [syncronizing file permissions](#unsynchronized-permissions) of mounted volumes between the host and the container.
| Docker Hub | Upstream Project |
|------------|------------------|
| <a href="https://hub.docker.com/r/devilbox/php-fpm"><img height="82px" src="http://dockeri.co/image/devilbox/php-fpm" /></a> | <a href="https://github.com/cytopia/devilbox" ><img height="82px" src="https://raw.githubusercontent.com/devilbox/artwork/master/submissions_banner/cytopia/01/png/banner_256_trans.png" /></a> |
---
#### Table of Contents
1. **[Motivation](#motivation)**
1. [Unsynchronized permissions](#unsynchronized-permissions)
2. [It gets even worse](#it-gets-even-worse)
3. [The solution](#the-solution)
2. **[PHP-FPM Flavours](#php-fpm-flavours)**
1. [Assembly](#assembly)
2. [Available Images](#available-images)
3. [Tagging](#tagging)
4. [PHP Modules](#php-modules)
3. **[PHP-FPM Features](#php-fpm-features)**
1. [Image: base](#image-base)
2. [Image: mods](#image-mods)
3. [Image: prod](#image-prod)
4. [Image: work](#image-work)
4. **[PHP-FPM Options](#php-fpm-options)**
1. [Environment variables](#environment-variables)
2. [Volumes](#volumes)
3. [Ports](#ports)
5. **[Integrated Development Environment](#integrated-development-environment)**
1. [What toos can you expect](#what-tools-can-you-expect)
2. [What else is available](#what-else-is-available)
6. **[Examples](#examples)**
1. [Provide PHP-FPM port to host](#provide-php-fpm-port-to-host)
2. [Alter PHP-FPM and system timezone](#alter-php-fpm-and-system-timezone)
3. [Load custom PHP configuration](#load-custom-php-configuration)
4. [Load custom PHP modules](#load-custom-php-modules)
5. [MySQL connect via 127.0.0.1 (via port-forward)](#mysql-connect-via-127-0-0-1-via-port-forward-)
6. [MySQL and Redis connect via 127.0.0.1 (via port-forward)](#mysql-and-redis-connect-via-127-0-0-1-via-port-forward-)
7. [Launch Postfix for mail-catching](#launch-postfix-for-mail-catching)
8. [Webserver and PHP-FPM](#webserver-and-php-fpm)
9. [Create MySQL Backups](#create-mysql-backups)
7. **[Automated builds](#automated-builds)**
8. **[Contributing](#contributing)**
9. **[Credits](#credits)**
10. **[License](#license)**
----
<h2><img id="motivation" width="20" src="https://github.com/devilbox/artwork/raw/master/submissions_logo/cytopia/01/png/logo_64_trans.png"> Motivation</h2>
One main problem with a running Docker container is to **synchronize the ownership of files in a mounted volume** in order to preserve security (Not having to use `chmod 0777`).
#### Unsynchronized permissions
Consider the following directory structure of a mounted volume. Your hosts computer uid/gid are `1000` which does not have a corresponding user/group within the container. Fortunately the `tmp/` directory allows everybody to create new files in it.
```shell
[Host] | [Container]
------------------------------------------------------------------------------------------
$ ls -l | $ ls -l
-rw-r--r-- user group index.php | -rw-r--r-- 1000 1000 index.php
drwxrwxrwx user group tmp/ | drwxrwxrwx 1000 1000 tmp/
```
Your web application might now have created some temporary files (via the PHP-FPM process) inside the `tmp/` directory:
```shell
[Host] | [Container]
------------------------------------------------------------------------------------------
$ ls -l tmp/ | $ ls -l tmp/
-rw-r--r-- 96 96 _tmp_cache01.php | -rw-r--r-- www www _tmp_cache01.php
-rw-r--r-- 96 96 _tmp_cache02.php | -rw-r--r-- www www _tmp_cache01.php
```
On the Docker container side everything is still fine, but on your host computers side, those files now show a user id and group id of `96`, which is in fact the uid/gid of the PHP-FPM process running inside the container. On the host side you will now have to use `sudo` in order to delete/edit those files.
#### It gets even worse
Consider your had created the `tmp/` directory on your host only with `0775` permissions:
```shell
[Host] | [Container]
------------------------------------------------------------------------------------------
$ ls -l | $ ls -l
-rw-r--r-- user group index.php | -rw-r--r-- 1000 1000 index.php
drwxrwxr-x user group tmp/ | drwxrwxr-x 1000 1000 tmp/
```
If your web application now wants to create some temporary files (via the PHP-FPM process) inside the `tmp/` directory, it will fail due to lacking permissions.
#### The solution
To overcome this problem, it must be made sure that the PHP-FPM process inside the container runs under the same uid/gid as your local user that mouns the volumes and also wants to work on those files locally. However, you never know during Image build time what user id this would be. Therefore it must be something that can be changed during startup of the container.
This is achieved by two environment variables that can be provided during startup in order to change the uid/gid of the PHP-FPM user prior starting up PHP-FPM.
```shell
$ docker run -e NEW_UID=1000 -e NEW_GID=1000 -it devilbox/php-fpm:7.2-base
[INFO] Changing user 'devilbox' uid to: 1000
root $ usermod -u 1000 devilbox
[INFO] Changing group 'devilbox' gid to: 1000
root $ groupmod -g 1000 devilbox
[INFO] Starting PHP 7.2.0 (fpm-fcgi) (built: Oct 30 2017 12:05:19)
```
When **`NEW_UID`** and **`NEW_GID`** are provided to the startup command, the container will do a `usermod` and `groupmod` prior starting up in order to assign new uid/gid to the PHP-FPM user. When the PHP-FPM process finally starts up it actually runs with your local system user and making sure permissions will be in sync from now on.
At a minimum those two environment variables are offered by all flavours and types of the here provided PHP-FPM images.
**Note:**
To tackle this on the PHP-FPM side is only half a solution to the problem. The same applies to a web server Docker container when you offer **file uploads**. They will be uploaded and created by the web servers uid/gid. Therefore the web server itself must also provide the same kind of solution. See the following Web server Docker images for how this is done:
**[Apache 2.2](https://github.com/devilbox/docker-apache-2.2)** |
**[Apache 2.4](https://github.com/devilbox/docker-apache-2.4)** |
**[Nginx stable](https://github.com/devilbox/docker-nginx-stable)** |
**[Nginx mainline](https://github.com/devilbox/docker-nginx-mainline)**
<h2><img id="php-fpm-flavours" width="20" src="https://github.com/devilbox/artwork/raw/master/submissions_logo/cytopia/01/png/logo_64_trans.png"> PHP-FPM Flavours</h2>
#### Assembly
The provided Docker images heavily rely on inheritance to guarantee smallest possible image size. Each of them provide a working PHP-FPM server and you must decide what version works best for you. Look at the sketch below to get an overview about the two provided flavours and each of their different types.
```shell
[PHP] # Base FROM image (Official PHP-FPM image)
^ #
| #
| #
[base] # Introduces env variables and adjusts entrypoint
^ #
| #
| #
[mods] # Installs additional PHP modules
^ # via pecl, git and other means
| #
| #
[prod] # Devilbox flavour for production
^ # (locales, postifx, socat and injectables)
| # (custom modules and *.ini files)
| #
[work] # Devilbox flavour for local development
# (includes backup and development tools)
# (sudo, custom bash and tool configs)
```
#### Available Images
The following table shows a more complete overview about the offered Docker images and what they should be used for.
<table>
<thead>
<tr>
<th width="80">Type</th>
<th width="280">Docker Image</th>
<th width="320">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td rowspan="8"><strong>base</strong></td>
<td><code>devilbox/php-fpm:5.3-base</code></td>
<td>
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/image/devilbox/php-fpm:5.3-base.svg" /></a>
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/version/devilbox/php-fpm:5.3-base.svg" /></a>
</td>
</tr>
<td><code>devilbox/php-fpm:5.4-base</code></td>
<td>
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/image/devilbox/php-fpm:5.4-base.svg" /></a>
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/version/devilbox/php-fpm:5.4-base.svg" /></a>
</td>
</tr>
<tr>
<td><code>devilbox/php-fpm:5.5-base</code></td>
<td>
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/image/devilbox/php-fpm:5.5-base.svg" /></a>
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/version/devilbox/php-fpm:5.5-base.svg" /></a>
</td>
</tr>
<tr>
<td><code>devilbox/php-fpm:5.6-base</code></td>
<td>
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/image/devilbox/php-fpm:5.6-base.svg" /></a>
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/version/devilbox/php-fpm:5.6-base.svg" /></a>
</td>
</tr>
<tr>
<td><code>devilbox/php-fpm:7.0-base</code></td>
<td>
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/image/devilbox/php-fpm:7.0-base.svg" /></a>
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/version/devilbox/php-fpm:7.0-base.svg" /></a>
</td>
</tr>
<tr>
<td><code>devilbox/php-fpm:7.1-base</code></td>
<td>
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/image/devilbox/php-fpm:7.1-base.svg" /></a>
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/version/devilbox/php-fpm:7.1-base.svg" /></a>
</td>
</tr>
<tr>
<td><code>devilbox/php-fpm:7.2-base</code></td>
<td>
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/image/devilbox/php-fpm:7.2-base.svg" /></a>
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/version/devilbox/php-fpm:7.2-base.svg" /></a>
</td>
</tr>
<tr>
<td><code>devilbox/php-fpm:7.3-base</code></td>
<td>
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/image/devilbox/php-fpm:7.3-base.svg" /></a>
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/version/devilbox/php-fpm:7.3-base.svg" /></a>
</td>
</tr>
<tr>
<td rowspan="8"><strong>mods</strong></td>
<td><code>devilbox/php-fpm:5.3-mods</code></td>
<td>
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/image/devilbox/php-fpm:5.3-mods.svg" /></a>
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/version/devilbox/php-fpm:5.3-mods.svg" /></a>
</td>
</tr>
<tr>
<td><code>devilbox/php-fpm:5.4-mods</code></td>
<td>
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/image/devilbox/php-fpm:5.4-mods.svg" /></a>
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/version/devilbox/php-fpm:5.4-mods.svg" /></a>
</td>
</tr>
<tr>
<td><code>devilbox/php-fpm:5.5-mods</code></td>
<td>
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/image/devilbox/php-fpm:5.5-mods.svg" /></a>
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/version/devilbox/php-fpm:5.5-mods.svg" /></a>
</td>
</tr>
<tr>
<td><code>devilbox/php-fpm:5.6-mods</code></td>
<td>
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/image/devilbox/php-fpm:5.6-mods.svg" /></a>
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/version/devilbox/php-fpm:5.6-mods.svg" /></a>
</td>
</tr>
<tr>
<td><code>devilbox/php-fpm:7.0-mods</code></td>
<td>
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/image/devilbox/php-fpm:7.0-mods.svg" /></a>
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/version/devilbox/php-fpm:7.0-mods.svg" /></a>
</td>
</tr>
<tr>
<td><code>devilbox/php-fpm:7.1-mods</code></td>
<td>
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/image/devilbox/php-fpm:7.1-mods.svg" /></a>
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/version/devilbox/php-fpm:7.1-mods.svg" /></a>
</td>
</tr>
<tr>
<td><code>devilbox/php-fpm:7.2-mods</code></td>
<td>
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/image/devilbox/php-fpm:7.2-mods.svg" /></a>
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/version/devilbox/php-fpm:7.2-mods.svg" /></a>
</td>
</tr>
<tr>
<td><code>devilbox/php-fpm:7.3-mods</code></td>
<td>
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/image/devilbox/php-fpm:7.3-mods.svg" /></a>
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/version/devilbox/php-fpm:7.3-mods.svg" /></a>
</td>
</tr>
<tr>
<td rowspan="8"><strong>prod</strong></td>
<td><code>devilbox/php-fpm:5.3-prod</code></td>
<td>
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/image/devilbox/php-fpm:5.3-prod.svg" /></a>
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/version/devilbox/php-fpm:5.3-prod.svg" /></a>
</td>
</tr>
<tr>
<td><code>devilbox/php-fpm:5.4-prod</code></td>
<td>
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/image/devilbox/php-fpm:5.4-prod.svg" /></a>
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/version/devilbox/php-fpm:5.4-prod.svg" /></a>
</td>
</tr>
<tr>
<td><code>devilbox/php-fpm:5.5-prod</code></td>
<td>
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/image/devilbox/php-fpm:5.5-prod.svg" /></a>
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/version/devilbox/php-fpm:5.5-prod.svg" /></a>
</td>
</tr>
<tr>
<td><code>devilbox/php-fpm:5.6-prod</code></td>
<td>
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/image/devilbox/php-fpm:5.6-prod.svg" /></a>
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/version/devilbox/php-fpm:5.6-prod.svg" /></a>
</td>
</tr>
<tr>
<td><code>devilbox/php-fpm:7.0-prod</code></td>
<td>
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/image/devilbox/php-fpm:7.0-prod.svg" /></a>
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/version/devilbox/php-fpm:7.0-prod.svg" /></a>
</td>
</tr>
<tr>
<td><code>devilbox/php-fpm:7.1-prod</code></td>
<td>
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/image/devilbox/php-fpm:7.1-prod.svg" /></a>
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/version/devilbox/php-fpm:7.1-prod.svg" /></a>
</td>
</tr>
<tr>
<td><code>devilbox/php-fpm:7.2-prod</code></td>
<td>
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/image/devilbox/php-fpm:7.2-prod.svg" /></a>
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/version/devilbox/php-fpm:7.2-prod.svg" /></a>
</td>
</tr>
<tr>
<td><code>devilbox/php-fpm:7.3-prod</code></td>
<td>
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/image/devilbox/php-fpm:7.3-prod.svg" /></a>
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/version/devilbox/php-fpm:7.3-prod.svg" /></a>
</td>
</tr>
<tr>
<td rowspan="8"><strong>work</strong></td>
<td><code>devilbox/php-fpm:5.3-work</code></td>
<td>
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/image/devilbox/php-fpm:5.3-work.svg" /></a>
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/version/devilbox/php-fpm:5.3-work.svg" /></a>
</td>
</tr>
<tr>
<td><code>devilbox/php-fpm:5.4-work</code></td>
<td>
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/image/devilbox/php-fpm:5.4-work.svg" /></a>
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/version/devilbox/php-fpm:5.4-work.svg" /></a>
</td>
</tr>
<tr>
<td><code>devilbox/php-fpm:5.5-work</code></td>
<td>
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/image/devilbox/php-fpm:5.5-work.svg" /></a>
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/version/devilbox/php-fpm:5.5-work.svg" /></a>
</td>
</tr>
<tr>
<td><code>devilbox/php-fpm:5.6-work</code></td>
<td>
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/image/devilbox/php-fpm:5.6-work.svg" /></a>
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/version/devilbox/php-fpm:5.6-work.svg" /></a>
</td>
</tr>
<tr>
<td><code>devilbox/php-fpm:7.0-work</code></td>
<td>
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/image/devilbox/php-fpm:7.0-work.svg" /></a>
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/version/devilbox/php-fpm:7.0-work.svg" /></a>
</td>
</tr>
<tr>
<td><code>devilbox/php-fpm:7.1-work</code></td>
<td>
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/image/devilbox/php-fpm:7.1-work.svg" /></a>
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/version/devilbox/php-fpm:7.1-work.svg" /></a>
</td>
</tr>
<tr>
<td><code>devilbox/php-fpm:7.2-work</code></td>
<td>
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/image/devilbox/php-fpm:7.2-work.svg" /></a>
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/version/devilbox/php-fpm:7.2-work.svg" /></a>
</td>
</tr>
<tr>
<td><code>devilbox/php-fpm:7.3-work</code></td>
<td>
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/image/devilbox/php-fpm:7.3-work.svg" /></a>
<a href="https://microbadger.com/images/devilbox/php-fpm"><img src="https://images.microbadger.com/badges/version/devilbox/php-fpm:7.3-work.svg" /></a>
</td>
</tr>
</tbody>
</table>
#### Tagging
This repository uses Docker tags to refer to different flavours and types of the PHP-FPM Docker image. Therefore `:latest` and `:<git-branch-name>` as well as `:<git-tag-name>` must be presented differently. Refer to the following table to see how tagged Docker images are produced at Docker hub:
<table>
<thead>
<tr>
<th width="190">Meant Tag</th>
<th width="300">Actual Tag</th>
<th>Comment</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>:latest</code></td>
<td>
<code>:X.Y-base</code><br/>
<code>:X.Y-mods</code><br/>
<code>:X.Y-prod</code><br/>
<code>:X.Y-work</code><br/>
</td>
<td>Stable<br/><sub>(rolling)</sub><br/><br/>These tags are produced by the master branch of this repository.</td>
</tr>
<tr>
<td><code>:&lt;git-tag-name&gt;</code></td>
<td>
<code>:X.Y-base-&lt;git-tag-name&gt;</code><br/>
<code>:X.Y-mods-&lt;git-tag-name&gt;</code><br/>
<code>:X.Y-prod-&lt;git-tag-name&gt;</code><br/>
<code>:X.Y-work-&lt;git-tag-name&gt;</code><br/>
</td>
<td>Stable<br/><sub>(fixed)</sub><br/><br/>Every git tag will produce and preserve these Docker tags.</td>
</tr>
<tr>
<td><code>:&lt;git-branch-name&gt;</code></td>
<td>
<code>:X.Y-base-&lt;git-branch-name&gt;</code><br/>
<code>:X.Y-mods-&lt;git-branch-name&gt;</code><br/>
<code>:X.Y-prod-&lt;git-branch-name&gt;</code><br/>
<code>:X.Y-work-&lt;git-branch-name&gt;</code><br/>
</td>
<td>Feature<br/><sub>(for testing)</sub><br/><br/>Tags produced by unmerged branches. Do not rely on them as they might come and go.</td>
</tr>
</tbody>
</table>
#### PHP Modules
Check out this table to see which Docker image provides what PHP modules.
<table>
<thead>
<tr>
<th></th>
<th width="45%"><code>base</code></th>
<th width="45%"><code>mods</code>, <code>prod</code> and <code>work</code></th>
</tr>
</thead>
<tbody>
<tr>
<th>5.3</th>
<td id="53-base">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</td>
<td id="53-mods">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</td>
</tr>
<tr>
<th>5.4</th>
<td id="54-base">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</td>
<td id="54-mods">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, sqlite3, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, wddx, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib</td>
</tr>
<tr>
<th>5.5</th>
<td id="55-base">Core, ctype, curl, date, dom, ereg, fileinfo, filter, ftp, hash, iconv, json, libxml, mbstring, mysqlnd, openssl, pcre, PDO, pdo_sqlite, Phar, posix, readline, Reflection, session, SimpleXML, SPL, sqlite3, standard, tokenizer, xml, xmlreader, xmlwriter, zlib</td>
<td id="55-mods">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, sqlite3, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, wddx, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib</td>
</tr>
<tr>
<th>5.6</th>
<td id="56-base">Core, ctype, curl, date, dom, ereg, fileinfo, filter, ftp, hash, iconv, json, libxml, mbstring, mhash, mysqlnd, openssl, pcre, PDO, pdo_sqlite, Phar, posix, readline, Reflection, session, SimpleXML, SPL, sqlite3, standard, tokenizer, xml, xmlreader, xmlwriter, zlib</td>
<td id="56-mods">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, mhash, 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, sqlite3, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, wddx, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib</td>
</tr>
<tr>
<th>7.0</th>
<td id="70-base">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, SPL, sqlite3, standard, tokenizer, xml, xmlreader, xmlwriter, zlib</td>
<td id="70-mods">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, SPL, sqlite3, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, wddx, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib</td>
</tr>
<tr>
<th>7.1</th>
<td id="71-base">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, SPL, sqlite3, standard, tokenizer, xml, xmlreader, xmlwriter, zlib</td>
<td id="71-mods">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, SPL, sqlite3, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, wddx, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib</td>
</tr>
<tr>
<th>7.2</th>
<td id="72-base">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</td>
<td id="72-mods">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</td>
</tr>
<tr>
<th>7.3</th>
<td id="73-base">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</td>
<td id="73-mods">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</td>
</tr>
</tbody>
</table>
<h2><img id="php-fpm-features" width="20" src="https://github.com/devilbox/artwork/raw/master/submissions_logo/cytopia/01/png/logo_64_trans.png"> PHP-FPM Features</h2>
#### 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
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.<br/><br/><sub>(Does not offer any environment variables except for `NEW_UID` and `NEW_GID`)</sub>
#### 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
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.<br/><br/><sub>(Does not offer any environment variables except for `NEW_UID` and `NEW_GID`)</sub></td>
#### 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
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.
#### 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
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.
<h2><img id="php-fpm-options" width="20" src="https://github.com/devilbox/artwork/raw/master/submissions_logo/cytopia/01/png/logo_64_trans.png"> PHP-FPM Options</h2>
#### Environment variables
Have a look at the following table to see all supported environment variables for each Docker image flavour.
<table>
<thead>
<tr>
@@ -40,7 +610,7 @@ Have a look at the following table to see all supported environment variables fo
<td colspan="5"></td>
</tr>
<tr>
<td rowspan="4"><strong>prod</strong><br/><br/><strong>work</strong></td>
<td rowspan="6"><strong>prod</strong><br/><br/><strong>work</strong></td>
<td><code>TIMEZONE</code></td>
<td>string</td>
<td><code>UTC</code></td>
@@ -52,6 +622,18 @@ Have a look at the following table to see all supported environment variables fo
<td><code>1</code></td>
<td>By default all Docker images are configured to output their PHP-FPM access and error logs to stdout and stderr. Those which support it can change the behaviour to log into files inside the container. Their respective directories are available as volumes that can be mounted to the host computer. This feature might help developer who are more comfortable with tailing or searching through actual files instead of using docker logs.<br/><br/>Set this variable to <code>0</code> in order to enable logging to files. Log files are avilable under <code>/var/log/php/</code> which is also a docker volume that can be mounted locally.</td>
</tr>
<tr>
<td><code>ENABLE_MODULES</code></td>
<td>string</td>
<td><code>''</code></td>
<td>Comma separated list of PHP modules to enable, which are not enabled by default.<br/><strong>Example:</strong><br/><code>ENABLE_MODULES=ioncube</code></td>
</tr>
<tr>
<td><code>DISABLE_MODULES</code></td>
<td>string</td>
<td><code>''</code></td>
<td>Comma separated list of PHP modules to disable.<br/><strong>Example:</strong><br/><code>DISABLE_MODULES=swoole,imagick</code></td>
</tr>
<tr>
<td><code>ENABLE_MAIL</code></td>
<td>bool</td>
@@ -89,7 +671,7 @@ Have a look at the following table to see all supported environment variables fo
</tbody>
</table>
### Volumes
#### Volumes
Have a look at the following table to see all offered volumes for each Docker image flavour.
@@ -97,7 +679,7 @@ Have a look at the following table to see all offered volumes for each Docker im
<thead>
<tr>
<th>Image</th>
<th width="220">Volumes</th>
<th width="240">Volumes</th>
<th>Description</th>
</tr>
</thead>
@@ -127,19 +709,23 @@ Have a look at the following table to see all offered volumes for each Docker im
<td colspan="3"></td>
</tr>
<tr>
<td rowspan="2"><strong>work</strong></td>
<td><code>/etc/bash-custom.d</code></td>
<td rowspan="3"><strong>work</strong></td>
<td><code>/etc/bashrc-devilbox.d</code></td>
<td>Mount this directory into your host computer and add custom configuration files for <code>bash</code> and other tools.</td>
</tr>
<tr>
<td><code>/shared/backups</code></td>
<td>Mount this directory into your host computer to access MySQL backups created by <a href="https://mysqldump-secure.org" >mysqldump-secure</a>.</td>
</tr>
<tr>
<td><code>/ca</code></td>
<td>Mount this directory into your host computer to bake any *.crt file that is located in there as a trusted SSL entity.</td>
</tr>
</tbody>
</table>
### Ports
#### Ports
Have a look at the following table to see all offered exposed ports for each Docker image flavour.
@@ -162,47 +748,296 @@ Have a look at the following table to see all offered exposed ports for each Doc
<h2><img id="integrated-development-environment" width="20" src="https://github.com/devilbox/artwork/raw/master/submissions_logo/cytopia/01/png/logo_64_trans.png"> Integrated Development Environment</h2>
<h2><img id="modules" width="20" src="https://github.com/devilbox/artwork/raw/master/submissions_logo/cytopia/01/png/logo_64_trans.png"> Modules</h2>
If you plan to use the PHP-FPM image for development, hence being able to execute common commands inside the container itself, you should go with the **work** Image.
The **work** Docker image has many common tools already installed which on one hand increases its image size, but on the other hand removes the necessity to install those tools locally.
You want to use tools such as `git`, `drush`, `composer`, `npm`, `eslint`, `phpcs` as well as many others, simply do it directly inside the container. As all Docker images are auto-built every night by travis-ci it is assured that you are always at the latest version of your favorite dev tool.
#### What tools can you expect
<table>
<thead>
<tr>
<th></th>
<th width="45%"><code>base</code></th>
<th width="45%"><code>mods</code>, <code>prod</code> and <code>work</code></th>
<th width="200">Tool</th>
<th>Description</th>
</tr>
</thead>
<tr>
<td><a href="https://github.com/cytopia/awesome-ci">awesome-ci</a></td>
<td>Various linting and source code analyzing tools.</td>
</tr>
<tr>
<td><a href="https://getcomposer.org">composer</a></td>
<td>Dependency Manager for PHP.</td>
</tr>
<tr>
<td><a href="https://drupalconsole.com">drupal-console</a></td>
<td>The Drupal CLI. A tool to generate boilerplate code, interact with and debug Drupal.</td>
</tr>
<tr>
<td><a href="http://www.drush.org">drush</a></td>
<td>Drush is a computer software shell-based application used to control, manipulate, and administer Drupal websites.</td>
</tr>
<tr>
<td><a href="https://eslint.org">eslint</a></td>
<td>The pluggable linting utility for JavaScript and JSX.</td>
</tr>
<tr>
<td><a href="https://git-scm.com">git</a></td>
<td>Git is a version control system for tracking changes in source files.</td>
</tr>
<tr>
<td><a href="https://github.com/nvie/gitflow">git-flow</a></td>
<td>Git-flow tools.</td>
</tr>
<tr>
<td><a href="https://gulpjs.com/">gulp</a></td>
<td>Gulp command line JS tool.</td>
</tr>
<tr>
<td><a href="https://gruntjs.com/">grunt</a></td>
<td>Grunt command line JS tool.</td>
</tr>
<tr>
<td><a href="https://github.com/zaach/jsonlint">jsonlint</a></td>
<td>Json command line linter.</td>
</tr>
<tr>
<td><a href="https://github.com/laravel/installer">laravel installer</a></td>
<td>A CLI tool to easily install and manage the laravel framework.</td>
</tr>
<tr>
<td><a href="http://linuxbrew.sh">linuxbrew</a></td>
<td>The Homebrew package manager for Linux.</td>
</tr>
<tr>
<td><a href="https://github.com/markdownlint/markdownlint">mdl</a></td>
<td>Markdown command line linter.</td>
</tr>
<tr>
<td><a href="https://github.com/ChrisWren/mdlint">mdlint</a></td>
<td>Markdown command line linter.</td>
</tr>
<tr>
<td><a href="https://mysqldump-secure.org">mysqldump-secure</a></td>
<td>Secury MySQL database backup tool with encryption.</td>
</tr>
<tr>
<td><a href="https://nodejs.org">nodejs</a></td>
<td>Node.js is an open-source, cross-platform JavaScript run-time environment for executing JavaScript code server-side.</td>
</tr>
<tr>
<td><a href="https://www.npmjs.com">npm</a></td>
<td>npm is a package manager for the JavaScript programming language.</td>
</tr>
<tr>
<td><a href="https://github.com/phalcon/phalcon-devtools">phalcon-devtools</a></td>
<td>CLI tool to generate code helping to develop faster and easy applications that use with Phalcon framework.</td>
</tr>
<tr>
<td><a href="https://github.com/squizlabs/PHP_CodeSniffer">phpcs</a></td>
<td>PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.</td>
</tr>
<tr>
<td><a href="https://github.com/squizlabs/PHP_CodeSniffer">phpcbf</a></td>
<td>PHP Code Beautifier and Fixer.</td>
</tr>
<tr>
<td><a href="https://photoncms.com/resources/installing">photon</a></td>
<td>Photon CMS cli.</td>
</tr>
<tr>
<td><a href="http://sass-lang.com/">sass</a></td>
<td>Sass CSS compiler.</td>
</tr>
<tr>
<td><a href="https://github.com/brigade/scss-lint">scss-lint</a></td>
<td>Sass/CSS command line linter.</td>
</tr>
<tr>
<td><a href="https://github.com/symfony/symfony-installer">symfony installer</a></td>
<td>This is the official installer to start new projects based on the Symfony full-stack framework.</td>
</tr>
<tr>
<td><a href="https://github.com/jonas/tig">tig</a></td>
<td>Text-mode Interface for Git.</td>
</tr>
<tr>
<td><a href="https://github.com/webpack/webpack">webpack</a></td>
<td>A bundler for javascript and friends.</td>
</tr>
<tr>
<td><a href="https://wp-cli.org">wp-cli</a></td>
<td>WP-CLI is the command-line interface for WordPress.</td>
</tr>
<tr>
<td><a href="https://github.com/adrienverge/yamllint">yamllint</a></td>
<td>Yaml command line linter.</td>
</tr>
<tr>
<td><a href="https://yarnpkg.com/en">yarn</a></td>
<td>Fast, reliable and secure dependency management.</td>
</tr>
<tbody>
<tr>
<th>5.4</th>
<td id="54-base">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</td>
<td id="54-mods">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, sqlite3, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, wddx, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib</td>
</tr>
<tr>
<th>5.5</th>
<td id="55-base">Core, ctype, curl, date, dom, ereg, fileinfo, filter, ftp, hash, iconv, json, libxml, mbstring, mysqlnd, openssl, pcre, PDO, pdo_sqlite, Phar, posix, readline, Reflection, session, SimpleXML, SPL, sqlite3, standard, tokenizer, xml, xmlreader, xmlwriter, zlib</td>
<td id="55-mods">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, sqlite3, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, wddx, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib</td>
</tr>
<tr>
<th>5.6</th>
<td id="56-base">Core, ctype, curl, date, dom, ereg, fileinfo, filter, ftp, hash, iconv, json, libxml, mbstring, mysqlnd, openssl, pcre, PDO, pdo_sqlite, Phar, posix, readline, Reflection, session, SimpleXML, SPL, sqlite3, standard, tokenizer, xml, xmlreader, xmlwriter, zlib</td>
<td id="56-mods">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, sqlite3, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, wddx, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib</td>
</tr>
<tr>
<th>7.0</th>
<td id="70-base">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, SPL, sqlite3, standard, tokenizer, xml, xmlreader, xmlwriter, zlib</td>
<td id="70-mods">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, SPL, sqlite3, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, wddx, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib</td>
</tr>
<tr>
<th>7.1</th>
<td id="71-base">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, SPL, sqlite3, standard, tokenizer, xml, xmlreader, xmlwriter, zlib</td>
<td id="71-mods">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, SPL, sqlite3, standard, swoole, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, wddx, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib</td>
</tr>
<tr>
<th>7.2</th>
<td id="72-base">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</td>
<td id="72-mods">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</td>
</tr>
</tbody>
</table>
#### What else is available
Apart from the provided tools, you will also be able to use the container similar as you would do with your host system. Just a few things to mention here:
* Mount custom bash configuration files so your config persists between restarts
* Use password-less `sudo` to become root and do whatever you need to do
If there is anything else you'd like to be able to do, drop me an issue.
<h2><img id="examples" width="20" src="https://github.com/devilbox/artwork/raw/master/submissions_logo/cytopia/01/png/logo_64_trans.png"> Examples</h2>
#### Provide PHP-FPM port to host
```shell
$ docker run -d \
-p 127.0.0.1:9000:9000 \
-t devilbox/php-fpm:7.2-prod
```
#### Alter PHP-FPM and system timezone
```shell
$ docker run -d \
-p 127.0.0.1:9000:9000 \
-e TIMEZONE=Europe/Berlin \
-t devilbox/php-fpm:7.2-prod
```
#### Load custom PHP configuration
`config/` is a local directory that will hold the PHP *.ini files you want to load into the Docker container.
```shell
# Create config directory to be mounted with dummy configuration
$ mkdir config
$ echo "xdebug.enable = 1" > config/xdebug.ini
# Run container and mount it
$ docker run -d \
-p 127.0.0.1:9000:9000 \
-v config:/etc/php-custom.d \
-t devilbox/php-fpm:7.2-prod
```
#### Load custom PHP modules
`modules/` is a local directory that will hold the PHP modules you want to mount into the Docker container. `config/` is a local directory that will hold the PHP *.ini files you want to load into the Docker container.
```shell
# Create module directory and place module into it
$ mkdir modules
$ cp /my/module/phalcon.so modules/
# Custom php config to load this module
$ mkdir config
$ echo "extension=/etc/php-modules.d/phalcon.so" > config/phalcon.ini
# Run container and mount it
$ docker run -d \
-p 127.0.0.1:9000:9000 \
-v config:/etc/php-custom.d \
-v modules:/etc/php-modules.d \
-t devilbox/php-fpm:7.2-prod
```
#### MySQL connect via 127.0.0.1 (via port-forward)
Forward MySQL Port from `172.168.0.30` (or any other IP address/hostname) and Port `3306` to the PHP docker on `127.0.0.1:3306`. By this, your PHP files inside the docker can use `127.0.0.1` to connect to a MySQL database.
```shell
$ docker run -d \
-p 127.0.0.1:9000:9000 \
-e FORWARD_PORTS_TO_LOCALHOST='3306:172.168.0.30:3306' \
-t devilbox/php-fpm:7.2-prod
```
#### MySQL and Redis connect via 127.0.0.1 (via port-forward)
Forward MySQL Port from `172.168.0.30:3306` and Redis port from `redis:6379` to the PHP docker on `127.0.0.1:3306` and `127.0.0.1:6379`. By this, your PHP files inside the docker can use `127.0.0.1` to connect to a MySQL or Redis database.
```shell
$ docker run -d \
-p 127.0.0.1:9000:9000 \
-e FORWARD_PORTS_TO_LOCALHOST='3306:172.168.0.30:3306, 6379:redis:6379' \
-t devilbox/php-fpm:7.2-prod
```
#### Launch Postfix for mail-catching
Once you set `$ENABLE_MAIL=1`, all mails sent via any of your PHP applications no matter to which domain, are catched locally into the `devilbox` account. You can also mount the mail directory locally to hook in with mutt and read those mails.
```shell
$ docker run -d \
-p 127.0.0.1:9000:9000 \
-v /tmp/mail:/var/mail \
-e ENABLE_MAIL=1 \
-t devilbox/php-fpm:7.2-prod
```
#### Webserver and PHP-FPM
`~/my-host-www` will be the directory that serves the php files (your document root). Make sure to mount it into both, php and the webserver.
```shell
# Start PHP-FPM container
$ docker run -d \
-v ~/my-host-www:/var/www/default/htdocs \
--name php \
-t devilbox/php-fpm:7.2-prod
# Start webserver and link with PHP-FPM
$ docker run -d \
-p 80:80 \
-v ~/my-host-www:/var/www/default/htdocs \
-e PHP_FPM_ENABLE=1 \
-e PHP_FPM_SERVER_ADDR=php \
-e PHP_FPM_SERVER_PORT=9000 \
--link php \
-t devilbox/nginx-mainline
```
#### Create MySQL Backups
**Note:** This will only work with `work` Docker images.
The MySQL server could be another Docker container linked to the PHP-FPM container. Let's assume the PHP-FPM container is able to access the MySQL container by the hostname `mysql`.
```
# Start container
$ docker run -d \
-e MYSQL_BACKUP_USER=root \
-e MYSQL_BACKUP_PASS=somepass \
-e MYSQL_BACKUP_HOST=mysql \
-v ~/backups:/shared/backsup \
--name php \
-t devilbox/php-fpm:7.2-work
# Run database dump
$ docker exec -it php mysqldump-secure
```
<h2><img id="automated-builds" width="20" src="https://github.com/devilbox/artwork/raw/master/submissions_logo/cytopia/01/png/logo_64_trans.png"> Automated builds</h2>
[![Build Status](https://travis-ci.org/devilbox/docker-php-fpm.svg?branch=master)](https://travis-ci.org/devilbox/docker-php-fpm)
Docker images are built and tested every night by **[travis-ci](https://travis-ci.org/devilbox/docker-php-fpm)** and pushed to **[Docker hub](https://hub.docker.com/r/devilbox/php-fpm/)** on success. This is all done automatically to ensure that sources as well as base images are always fresh and in case of security updates always have the latest patches.
<h2><img id="contributing" width="20" src="https://github.com/devilbox/artwork/raw/master/submissions_logo/cytopia/01/png/logo_64_trans.png"> Contributing</h2>
Contributors are welcome. Feel free to star and clone this repository and submit issues and pull-requests. Add examples and show what you have created with the provided images. If you see any errors or ways to improve this repository in any way, please do so.
<h2><img id="credits" width="20" src="https://github.com/devilbox/artwork/raw/master/submissions_logo/cytopia/01/png/logo_64_trans.png"> Credits</h2>
* **[cytopia](https://github.com/cytopia)**
<h2><img id="license" width="20" src="https://github.com/devilbox/artwork/raw/master/submissions_logo/cytopia/01/png/logo_64_trans.png"> License</h2>
**[MIT License](LICENSE.md)**
Copyright (c) 2017 [cytopia](https://github.com/cytopia)

View File

@@ -1,5 +1,11 @@
# 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 %}
MAINTAINER "cytopia" <cytopia@everythingcli.org>
@@ -46,7 +52,11 @@ RUN set -x \
###
RUN set -x \
&& rm -rf /usr/local/etc/php-fpm.d \
&& mkdir -p /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
###
@@ -56,6 +66,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 %}

View File

@@ -113,6 +113,9 @@ RUN set -x \
{% endif %}
&& docker-php-ext-enable {{ ext }} \
&& cd / && rm -rf /tmp/{{ ext }} \
{# ---- 4.) CUSTOM ---- #}
{% elif extensions_available[ext][php_version]['type'] == 'custom' %}
&& {{ extensions_available[ext][php_version]['command'] }} \
{% endif %}
{# ---------- Installation (generic) ---------- #}
{% elif 'all' in extensions_available[ext] and 'type' in extensions_available[ext]['all'] %}
@@ -147,6 +150,9 @@ RUN set -x \
{% endif %}
&& docker-php-ext-enable {{ ext }} \
&& cd / && rm -rf /tmp/{{ ext }} \
{# ---- 4.) CUSTOM ---- #}
{% elif extensions_available[ext]['all']['type'] == 'custom' %}
&& {{ extensions_available[ext]['all']['command'] }} \
{% endif %}
{% endif %}
{% endif %}
@@ -181,6 +187,8 @@ RUN set -x \
{% if ext == 'opcache' %}
&& php -m | grep -oiE '^Zend Opcache$' \
&& php-fpm -m | grep -oiE '^Zend Opcache$' \
{% elif ext == 'ioncube' %}
{# Not enabled #}
{% else %}
&& php -m | grep -oiE '^{{ ext }}$' \
&& php-fpm -m | grep -oiE '^{{ ext }}$' \

View File

@@ -86,6 +86,7 @@ RUN set -x \
net-tools \
netcat \
nodejs \
openssh-client \
postgresql-client \
python-pip \
redis-tools \
@@ -145,8 +146,8 @@ 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/bash-custom.d/ ]; then"; \
echo " for f in /etc/bash-custom.d/*.sh ; do"; \
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"; \
@@ -193,7 +194,7 @@ COPY ./data/sudo-devilbox /etc/sudoers.d/devilbox
###
### Volumes
###
VOLUME /etc/bash-custom.d
VOLUME /etc/bashrc-devilbox.d
VOLUME /etc/php-custom.d
VOLUME /etc/php-fpm-custom.d
VOLUME /etc/php-modules.d

View File

@@ -1,5 +1,6 @@
---
# All available Docker flavours (for each version)
template_files:
- src: DOCKERFILES/Dockerfile-base.j2
dst: "../../Dockerfiles/base/Dockerfile-{{ php_version }}"
@@ -11,22 +12,26 @@ template_files:
dst: "../../Dockerfiles/work/Dockerfile-{{ php_version }}"
# Adds self-validating checks to Dockerfile
# turn off for final build
debug: True
# All available PHP version
php_all_versions:
- 5.3
- 5.4
- 5.5
- 5.6
- 7.0
- 7.1
- 7.2
- 7.3
# Global variables
compose_home: /usr/local/src/composer
################################################################################
# Defines for Dockerfile "work"
@@ -53,16 +58,19 @@ software_enabled:
- composer
# Normal packages start here
- awesomeci
- codeception
- drush
- drupalconsole
- gitflow
- grunt
- laravel
- linuxbrew
- mhsendmail
- mysqldumpsecure
- phalcon
- phpcs
- phpcbf
- photon
- sass
- symfony
- webpack
@@ -92,6 +100,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
@@ -102,12 +112,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 -
@@ -163,12 +177,17 @@ 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 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.4:
5.5:
pre: |
git clone https://github.com/drush-ops/drush.git /usr/local/src/drush \
&& cd /usr/local/src/drush \
@@ -187,8 +206,14 @@ software_available:
&& rm -rf /usr/local/src/drush/examples \
&& rm -rf /usr/local/src/drush/misc \
&& rm -rf /usr/local/src/drush/tests \
codeception:
check: codecept --version 2>/dev/null | grep -E '^Codeception(\sversion)?\s[.0-9]+$'
all:
command: |
COMPOSER_HOME="{{ compose_home }}" composer global require codeception/codeception --dev \
&& ln -s {{ compose_home }}/vendor/codeception/codeception/codecept /usr/local/bin/codecept \
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,7 +232,13 @@ 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 v1.3.7 \
5.5:
pre: |
git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \
&& cd /usr/local/src/laravel-installer \
@@ -217,16 +248,11 @@ software_available:
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:
7.0:
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:
pre: |
git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \
&& cd /usr/local/src/laravel-installer \
&& git checkout v1.3.7 \
all:
pre: |
git clone https://github.com/laravel/installer /usr/local/src/laravel-installer \
@@ -251,6 +277,12 @@ software_available:
'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' \
mhsendmail:
all:
command: |
wget https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mhsendmail_linux_amd64 \
&& chmod +x mhsendmail_linux_amd64 \
&& mv mhsendmail_linux_amd64 /usr/local/bin/mhsendmai \
mysqldumpsecure:
check: mysqldump-secure --version | grep -E 'Version:\s*[.0-9]+'
all:
@@ -276,7 +308,13 @@ software_available:
&& cd / \
&& rm -rf /usr/local/src/mysqldump-secure \
phalcon:
disabled: [7.3]
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,21 +333,37 @@ 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 \
&& chmod +x /usr/local/bin/phpcbf \
photon:
check: photon --version | grep -E 'Installer [.0-9]+'
disabled: [5.3, 5.4]
all:
command: |
COMPOSER_HOME="{{ compose_home }}" composer global require "photoncms/installer" \
&& ln -s {{ compose_home }}/vendor/photoncms/installer/photon /usr/local/bin/photon \
sass:
check: sass --version | grep -E '[.0-9]+'
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
@@ -361,6 +415,8 @@ software_available:
### Extensions to actually enable
###
extensions_enabled:
# ioncube must be loaded first
- ioncube
- amqp
- apcu
- bcmath
@@ -468,17 +524,26 @@ extensions_enabled:
# git_ref: [optional] Tag, branch, commit to checkout
# configure: [optional] Add './configure' arguments
# command: [optional] Overwrite default command (phpize && ./configure && make && make install)
# type: custom
# command: [required] Custom command to install and enable a module
extensions_available:
amqp:
7.2:
type: pecl
run_dep: [librabbitmq4]
disabled: [7.3]
5.3:
run_dep: [librabbitmq1]
5.4:
run_dep: [librabbitmq1]
5.5:
run_dep: [librabbitmq1]
all:
type: pecl
command: echo "/usr" | pecl install amqp
build_dep: [librabbitmq-dev]
run_dep: [librabbitmq1]
run_dep: [librabbitmq4]
apcu:
5.3:
type: pecl
version: 4.0.11
5.4:
type: pecl
version: 4.0.11
@@ -534,27 +599,46 @@ 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:
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:
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]
all:
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]
5.4:
type: builtin
pre: ln -s /usr/lib/x86_64-linux-gnu/libXpm.* /usr/lib/
configure: --with-gd --with-vpx-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]
run_dep: [libpng12-0, libjpeg62-turbo, libxpm4, libvpx1, libfreetype6]
5.5:
type: builtin
pre: ln -s /usr/lib/x86_64-linux-gnu/libXpm.* /usr/lib/
configure: --with-gd --with-vpx-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]
run_dep: [libpng12-0, libjpeg62-turbo, libxpm4, libvpx1, libfreetype6]
5.6:
type: builtin
pre: ln -s /usr/lib/x86_64-linux-gnu/libXpm.* /usr/lib/
configure: --with-gd --with-vpx-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
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
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
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
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
all:
type: builtin
pre: ln -s /usr/lib/x86_64-linux-gnu/libXpm.* /usr/lib/
configure: --with-gd --with-vpx-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: [libpng16-16, libjpeg62-turbo, libxpm4, libvpx4, libfreetype6, libwebp6]
gettext:
all:
type: builtin
@@ -573,13 +657,20 @@ extensions_available:
all:
type: pecl
imagick:
7.2:
5.3:
type: pecl
run_dep: [libmagickwand-6.q16-3]
version: 3.3.0
run_dep: [libmagickwand-6.q16-2]
5.4:
type: pecl
run_dep: [libmagickwand-6.q16-2]
5.5:
type: pecl
run_dep: [libmagickwand-6.q16-2]
all:
type: pecl
build_dep: [libmagickwand-dev]
run_dep: [libmagickwand-6.q16-2]
run_dep: [libmagickwand-6.q16-3]
imap:
all:
type: builtin
@@ -593,13 +684,33 @@ extensions_available:
build_dep: [libfbclient2, libib-util, firebird-dev]
run_dep: [libfbclient2]
intl:
7.2:
5.3:
type: builtin
run_dep: [libicu57]
run_dep: [libicu52]
5.4:
type: builtin
run_dep: [libicu52]
5.5:
type: builtin
run_dep: [libicu52]
all:
type: builtin
build_dep: [libicu-dev]
run_dep: [libicu52]
run_dep: [libicu57]
ioncube:
disabled: [7.3]
all:
type: custom
command: |
EXTENSION_DIR="$( php -i | grep ^extension_dir | awk -F '=>' '{print $2}' | xargs )" \
&& if [ ! -d "${EXTENSION_DIR}" ]; then mkdir -p "${EXTENSION_DIR}"; fi \
&& curl https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz -L -o ioncube.tar.gz \
&& tar xvfz ioncube.tar.gz \
&& cd ioncube \
&& cp "ioncube_loader_lin_{{ php_version }}.so" "${EXTENSION_DIR}/ioncube.so" \
&& cd ../ \
&& rm -rf ioncube \
&& rm -rf ioncube.tar.gz \
json:
7.0:
type: builtin
@@ -615,18 +726,23 @@ 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:
7.2:
disabled: [7.3]
7.0:
type: git
git_url: https://github.com/websupport-sk/pecl-memcache
configure: --with-zlib-dir=/usr
@@ -634,7 +750,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 +758,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
@@ -651,24 +770,36 @@ 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 -j$(getconf _NPROCESSORS_ONLN) && 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
build_dep: [libssl-dev, libsasl2-dev]
mongodb:
5.3:
type: pecl
version: 0.6.3
5.4:
type: pecl
version: 1.2.11
all:
type: pecl
build_dep: [libssl-dev]
build_dep: [libssl-dev, libsasl2-dev]
msgpack:
disabled: [7.3]
5.3:
type: pecl
version: 0.5.7
5.4:
type: pecl
version: 0.5.7
@@ -681,9 +812,13 @@ 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
5.6:
type: builtin
run_dep: [libmariadbclient18]
all:
type: builtin
run_dep: [libmysqlclient18]
mysqli:
all:
type: builtin
@@ -694,6 +829,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,11 +884,23 @@ extensions_available:
build_dep: [libpq-dev]
run_dep: [libpq5]
phalcon:
disabled: [7.3]
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
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
@@ -758,7 +908,7 @@ extensions_available:
command: cd build && ./install
phar:
# https://github.com/docker-library/php/issues/618
disabled: [7.0] # TODO: Currently disabled due to bug in built
disabled: [5.6, 7.0] # TODO: Currently disabled due to bug in built
all:
type: builtin
build_dep: [libssl-dev]
@@ -771,7 +921,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,29 +961,74 @@ extensions_available:
all:
type: builtin
sodium:
disabled: [5.4, 5.5, 5.6, 7.0, 7.1]
7.2:
disabled: [5.3, 5.4, 5.5, 5.6, 7.0, 7.1]
all:
type: builtin
build_dep: [libsodium-dev]
spl:
disabled: "{{ php_all_versions }}" # TODO: Did not work
swoole:
5.3:
type: pecl
version: 1.9.23
run_dep: [libnghttp2-5]
5.4:
type: pecl
version: 1.9.23
run_dep: [libnghttp2-5]
5.5:
type: pecl
version: 1.9.23
run_dep: [libnghttp2-5]
5.6:
type: pecl
version: 1.9.23
7.2:
7.0:
type: pecl
run_dep: [libnghttp2-14]
version: 2.2.0
7.3:
type: git
git_url: https://github.com/swoole/swoole-src
git_ref: master
command: |
git submodule update --init --recursive \
&& cd thirdparty/hiredis \
&& make -j$(getconf _NPROCESSORS_ONLN) \
&& make install \
&& cd ../nghttp2 \
&& cmake . \
&& make install \
&& ldconfig \
&& cd ../.. \
&& phpize \
&& ./configure \
--enable-async-redis \
--enable-openssl \
--enable-thread \
--enable-swoole \
--enable-swoole-static \
--with-swoole \
--with-openssl-dir=/usr \
--enable-mysqlnd \
--enable-coroutine \
--enable-picohttpparser \
#`--enable-timewheel` \
#`--enable-hugepage` \
#`--enable-asan` \
#`--with-phpx-dir=` \
#`--with-jemalloc-dir=/usr/include/jemalloc` \
#`--enable-coroutine-postgresql` \
#`--enable-http2` \
#`--enable-sockets` \
#`--with-libpq-dir=/usr/include/postgresql/libpq/` \
&& make -j$(getconf _NPROCESSORS_ONLN) \
&& make install \
run_dep: [libnghttp2-14, libhiredis0.13]
build_dep: [libnghttp2-dev, libssl-dev, libhiredis-dev, cmake]
all:
type: pecl
build_dep: [libnghttp2-dev, libssl-dev]
run_dep: [libnghttp2-5]
run_dep: [libnghttp2-14]
sysvmsg:
all:
type: builtin
@@ -844,18 +1039,24 @@ extensions_available:
all:
type: builtin
tidy:
7.2:
5.3:
type: builtin
run_dep: [libtidy5]
run_dep: [libtidy-0.99-0]
5.4:
type: builtin
run_dep: [libtidy-0.99-0]
5.5:
type: builtin
run_dep: [libtidy-0.99-0]
all:
type: builtin
build_dep: [libtidy-dev]
run_dep: [libtidy-0.99-0]
run_dep: [libtidy5]
tokenizer:
all:
type: builtin
uploadprogress:
7.2:
7.0:
type: git
git_url: https://github.com/php/pecl-php-uploadprogress
configure: --enable-uploadprogress
@@ -863,7 +1064,11 @@ 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
7.3:
type: git
git_url: https://github.com/php/pecl-php-uploadprogress
configure: --enable-uploadprogress
@@ -875,6 +1080,10 @@ extensions_available:
configure: --with-libxml-dir=/usr
build_dep: [libxml2-dev]
xdebug:
disabled: [7.3]
5.3:
type: pecl
version: 2.2.7
5.4:
type: pecl
version: 2.4.1
@@ -892,7 +1101,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
@@ -913,6 +1122,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
@@ -923,11 +1137,8 @@ extensions_available:
configure: --with-zlib-dir=/usr --with-pcre-dir=/usr
build_dep: [zlib1g-dev]
run_dep: []
7.2:
type: builtin
run_dep: [libzip4]
all:
type: builtin
configure: --with-zlib-dir=/usr --with-pcre-dir=/usr --with-libzip
build_dep: [zlib1g-dev, libzip-dev]
run_dep: [libzip2]
run_dep: [libzip4]

View File

@@ -1,7 +1,9 @@
[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
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

View File

@@ -14,12 +14,14 @@ 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"
echo " gen-readme.sh 7.0"
echo " gen-readme.sh 7.1"
echo " gen-readme.sh 7.2"
echo " gen-readme.sh 7.3"
}
@@ -61,24 +63,28 @@ 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"
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."
print_usage
exit 1
else
if [ "${1}" != "5.3" ] \
if [ "${1}" != "5.4" ] \
&& [ "${1}" != "5.5" ] \
&& [ "${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