├── .gitignore ├── README.md ├── deploybot ├── README.md └── php7 │ ├── Dockerfile │ └── ssh_config └── legacy ├── README.md ├── nginx └── Dockerfile └── php ├── 5.3 ├── apache │ ├── Dockerfile │ └── apache2.conf └── fpm │ ├── Dockerfile │ ├── docker-php-ext-configure │ ├── docker-php-ext-enable │ ├── docker-php-ext-install │ └── php-fpm.conf ├── 5.4 ├── apache │ ├── Dockerfile │ ├── apache2-foreground │ ├── apache2.conf │ ├── docker-php-ext-configure │ ├── docker-php-ext-enable │ └── docker-php-ext-install └── fpm │ ├── Dockerfile │ ├── docker-php-ext-configure │ ├── docker-php-ext-enable │ ├── docker-php-ext-install │ └── php-fpm.conf ├── 5.5 ├── apache │ ├── Dockerfile │ ├── apache2-foreground │ ├── apache2.conf │ ├── docker-php-ext-configure │ ├── docker-php-ext-enable │ └── docker-php-ext-install └── fpm │ ├── Dockerfile │ ├── docker-php-ext-configure │ ├── docker-php-ext-enable │ ├── docker-php-ext-install │ └── php-fpm.conf ├── 5.6 ├── apache │ ├── Dockerfile │ ├── apache2.conf │ ├── docker-php-ext-configure │ └── docker-php-ext-install └── fpm │ ├── Dockerfile │ ├── docker-php-ext-configure │ ├── docker-php-ext-enable │ ├── docker-php-ext-install │ └── php-fpm.conf └── 7.0 ├── apache ├── Dockerfile ├── apache2-foreground ├── apache2.conf ├── docker-php-ext-configure ├── docker-php-ext-enable └── docker-php-ext-install └── fpm ├── Dockerfile ├── docker-php-ext-configure ├── docker-php-ext-enable ├── docker-php-ext-install └── php-fpm.conf /.gitignore: -------------------------------------------------------------------------------- 1 | .idea -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 10up Docker Library 2 | Random Docker images created by 10up 3 | 4 | In this repo you will find Docker files orginized into directories: 5 | 6 | `legacy` - older unsupported Docker images from defunct projects that are archived here for posterity. 7 | 8 | `deploybot` - Custom images intended for use with DeployBot's [build tools](https://deploybot.com/blog/say-hi-to-deploybot-and-build-tools). 9 | -------------------------------------------------------------------------------- /deploybot/README.md: -------------------------------------------------------------------------------- 1 | # Deploybot build images 2 | Custom images intended for use with DeployBot's [build tools](https://deploybot.com/blog/say-hi-to-deploybot-and-build-tools). 3 | 4 | Currently has one image for PHP7 support during the build process. Contains the following tools: 5 | * PHP7 6 | * Composer v 1.2.0 7 | * Node.js v 6.9.1 8 | * NPM v 3.10.8 9 | * Yarn v 0.17.9 10 | * Gulp 3.9.1 11 | -------------------------------------------------------------------------------- /deploybot/php7/Dockerfile: -------------------------------------------------------------------------------- 1 | from php:7.0.13-cli 2 | 3 | RUN cd /tmp && \ 4 | /usr/bin/curl -sL -o setup_6.x https://deb.nodesource.com/setup_6.x && \ 5 | bash setup_6.x && \ 6 | /usr/bin/apt-get update && \ 7 | /usr/bin/apt-get install -y bzip2 rubygems rubygems-integration inotify-tools nodejs git zlib1g-dev libbz2-dev libpng12-dev libjpeg-dev && \ 8 | npm -g install yarn gulp grunt grunt-cli grunt-sass node-sass && \ 9 | docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr && \ 10 | docker-php-ext-install zip bz2 gd 11 | 12 | # Install Sass 13 | RUN gem install sass -v 3.4.23 14 | 15 | # Register the COMPOSER_HOME environment variable 16 | ENV COMPOSER_HOME /composer 17 | 18 | # Add global binary directory to PATH and make sure to re-export it 19 | ENV PATH /composer/vendor/bin:$PATH 20 | 21 | # Allow Composer to be run as root 22 | ENV COMPOSER_ALLOW_SUPERUSER 1 23 | 24 | # Setup the Composer installer 25 | RUN curl -o /tmp/composer-setup.php https://getcomposer.org/installer \ 26 | && curl -o /tmp/composer-setup.sig https://composer.github.io/installer.sig \ 27 | && php -r "if (hash('SHA384', file_get_contents('/tmp/composer-setup.php')) !== trim(file_get_contents('/tmp/composer-setup.sig'))) { unlink('/tmp/composer-setup.php'); echo 'Invalid installer' . PHP_EOL; exit(1); }" 28 | 29 | ENV COMPOSER_VERSION 1.3.1 30 | # Install Composer 31 | RUN php /tmp/composer-setup.php --no-ansi --install-dir=/usr/local/bin --filename=composer --version=${COMPOSER_VERSION} && rm -rf /tmp/composer-setup.php 32 | 33 | RUN mkdir ~/.ssh && \ 34 | chmod 600 ~/.ssh && \ 35 | touch ~/.ssh/known_hosts && \ 36 | chmod 600 ~/.ssh/known_hosts && \ 37 | ssh-keyscan github.com >> ~/.ssh/known_hosts && \ 38 | ssh-keyscan 10up.git.beanstalkapp.com >> ~/.ssh/known_hosts 39 | 40 | COPY ssh_config /root/.ssh/config 41 | RUN chmod 600 /root/.ssh/config 42 | -------------------------------------------------------------------------------- /deploybot/php7/ssh_config: -------------------------------------------------------------------------------- 1 | Host * 2 | StrictHostKeyChecking no 3 | -------------------------------------------------------------------------------- /legacy/README.md: -------------------------------------------------------------------------------- 1 | # Legacy Unsupported Containers 2 | 3 | The Dockerfiles in this repository can be used to compile Docker images intended to be used as PHP upstreams for WordPress sites. 4 | 5 | ## Nginx 6 | 7 | ## PHP 8 | ### What's Included 9 | 10 | PHP-FPM at: 11 | 12 | - 5.3.29 13 | - 5.4.45 14 | - 5.5.34 15 | - 5.6.20 16 | - 7.0.5 17 | 18 | ### How to use it 19 | 20 | First, run a container: 21 | 22 | ```sh 23 | docker run -d -v /var/www:/var/www --net=host --name php7 10up/php:7.0-fpm 24 | ``` 25 | 26 | Then, set your PHP upstreams in Nginx to point to the container. For clarity, each container listens on a different port: 27 | 28 | - 5.3 => 9053 29 | - 5.4 => 9054 30 | - 5.5 => 9055 31 | - 5.6 => 9056 32 | - 7.0 => 9070 33 | 34 | The `--host=net` directive above will map all host ports into the container, so if PHP is running globally on port 9000, the containers won't conflict. 35 | 36 | In addition, this means the PHP process in each container can communicate with Memcached (port 11211) and MySQL (port 3306) on the Docker host as well. 37 | 38 | Each container will attempt to install the Pecl extensions for caching backends: 39 | - Redis 40 | - Memcached 41 | - Memcache 42 | - APCu 43 | 44 | (Unless they are unsupported. APCu is PHP7 only. Redis and Memcached are not yet PHP7-compatible.) 45 | 46 | ### What's Next 47 | 48 | Minify the containers 49 | - Each container image is ~180MB. We should make sure this is as small as it can be. 50 | 51 | ## License 52 | 53 | 10up's Docker Library is free software; you can redistribute it and/or modify it under the terms of the [GNU General 54 | Public License](http://www.gnu.org/licenses/gpl-2.0.html) as published by the Free Software Foundation; either version 55 | 2 of the License, or (at your option) any later version. 56 | -------------------------------------------------------------------------------- /legacy/nginx/Dockerfile: -------------------------------------------------------------------------------- 1 | # Dockerfile written by 10up 2 | # 3 | # Work derived from Nginx Dockerfile: 4 | # https://github.com/dockerfile/nginx 5 | 6 | # Pull base image. 7 | FROM ubuntu:14.04 8 | 9 | MAINTAINER Eric Mann "eric.mann@10up.com" 10 | 11 | ENV DEBIAN_FRONTEND noninteractive 12 | 13 | # Install build tools 14 | RUN \ 15 | sed -i 's/# \(.*multiverse$\)/\1/g' /etc/apt/sources.list && \ 16 | apt-get update && \ 17 | apt-get -y upgrade && \ 18 | apt-get install -y build-essential && \ 19 | apt-get install -y software-properties-common && \ 20 | rm -rf /var/lib/apt/lists/* 21 | 22 | # Install Nginx. 23 | RUN \ 24 | add-apt-repository -y ppa:nginx/stable && \ 25 | apt-get update && \ 26 | apt-get install -y nginx && \ 27 | rm -rf /var/lib/apt/lists/* && \ 28 | echo "\ndaemon off;" >> /etc/nginx/nginx.conf && \ 29 | chown -R www-data:www-data /var/lib/nginx 30 | 31 | # Define mountable directories. 32 | VOLUME ["/etc/nginx/sites-enabled", "/etc/nginx/certs", "/etc/nginx/conf.d", "/var/log/nginx", "/var/www/html", "/var/cache/nginx"] 33 | 34 | # Define working directory. 35 | WORKDIR /etc/nginx 36 | 37 | # Expose ports. 38 | EXPOSE 80 443 39 | 40 | # Define default command. 41 | CMD ["nginx"] -------------------------------------------------------------------------------- /legacy/php/5.3/apache/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM buildpack-deps:jessie 2 | 3 | RUN apt-get update && apt-get install -y curl && rm -r /var/lib/apt/lists/* 4 | 5 | #### 6 | RUN apt-get update && apt-get install -y apache2-bin apache2-dev apache2.2-common --no-install-recommends && rm -rf /var/lib/apt/lists/* 7 | 8 | RUN rm -rf /var/www/html && mkdir -p /var/lock/apache2 /var/run/apache2 /var/log/apache2 /var/www/html && chown -R www-data:www-data /var/lock/apache2 /var/run/apache2 /var/log/apache2 /var/www/html 9 | 10 | # Apache + PHP requires preforking Apache for best results 11 | RUN a2dismod mpm_event && a2enmod mpm_prefork 12 | 13 | RUN mv /etc/apache2/apache2.conf /etc/apache2/apache2.conf.dist 14 | COPY apache2.conf /etc/apache2/apache2.conf 15 | #### 16 | 17 | RUN gpg --keyserver pgp.mit.edu --recv-keys 0B96609E270F565C13292B24C13C70B87267B52D 0A95E9A026542D53835E3F3A7DEC4E69FC9C83D7 18 | 19 | ENV PHP_VERSION 5.3.29 20 | 21 | # php 5.3 needs older autoconf 22 | RUN set -x \ 23 | && apt-get update && apt-get install -y autoconf2.13 && rm -r /var/lib/apt/lists/* \ 24 | && curl -SLO http://launchpadlibrarian.net/140087283/libbison-dev_2.7.1.dfsg-1_amd64.deb \ 25 | && curl -SLO http://launchpadlibrarian.net/140087282/bison_2.7.1.dfsg-1_amd64.deb \ 26 | && dpkg -i libbison-dev_2.7.1.dfsg-1_amd64.deb \ 27 | && dpkg -i bison_2.7.1.dfsg-1_amd64.deb \ 28 | && rm *.deb \ 29 | && curl -SL "http://php.net/get/php-$PHP_VERSION.tar.bz2/from/this/mirror" -o php.tar.bz2 \ 30 | && curl -SL "http://php.net/get/php-$PHP_VERSION.tar.bz2.asc/from/this/mirror" -o php.tar.bz2.asc \ 31 | && gpg --verify php.tar.bz2.asc \ 32 | && mkdir -p /usr/src/php \ 33 | && tar -xf php.tar.bz2 -C /usr/src/php --strip-components=1 \ 34 | && rm php.tar.bz2* \ 35 | && cd /usr/src/php \ 36 | && ./buildconf --force \ 37 | && ./configure --disable-cgi \ 38 | $(command -v apxs2 > /dev/null 2>&1 && echo '--with-apxs2' || true) \ 39 | --with-mysql \ 40 | --with-mysqli \ 41 | --with-pdo-mysql \ 42 | --with-openssl \ 43 | && make -j"$(nproc)" \ 44 | && make install \ 45 | && dpkg -r bison libbison-dev \ 46 | && apt-get purge -y --auto-remove autoconf2.13 \ 47 | && rm -r /usr/src/php 48 | 49 | WORKDIR /var/www/html 50 | 51 | EXPOSE 80 52 | CMD ["apache2", "-DFOREGROUND"] 53 | -------------------------------------------------------------------------------- /legacy/php/5.3/apache/apache2.conf: -------------------------------------------------------------------------------- 1 | # see http://sources.debian.net/src/apache2/2.4.10-1/debian/config-dir/apache2.conf 2 | 3 | Mutex file:/var/lock/apache2 default 4 | PidFile /var/run/apache2/apache2.pid 5 | Timeout 300 6 | KeepAlive On 7 | MaxKeepAliveRequests 100 8 | KeepAliveTimeout 5 9 | User www-data 10 | Group www-data 11 | HostnameLookups Off 12 | ErrorLog /proc/self/fd/2 13 | LogLevel warn 14 | 15 | IncludeOptional mods-enabled/*.load 16 | IncludeOptional mods-enabled/*.conf 17 | 18 | # ports.conf 19 | Listen 80 20 | 21 | Listen 443 22 | 23 | 24 | Listen 443 25 | 26 | 27 | 28 | Options FollowSymLinks 29 | AllowOverride None 30 | Require all denied 31 | 32 | 33 | 34 | Options Indexes FollowSymLinks 35 | AllowOverride All 36 | Require all granted 37 | 38 | 39 | AccessFileName .htaccess 40 | 41 | Require all denied 42 | 43 | 44 | LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined 45 | LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined 46 | LogFormat "%h %l %u %t \"%r\" %>s %O" common 47 | LogFormat "%{Referer}i -> %U" referer 48 | LogFormat "%{User-agent}i" agent 49 | 50 | CustomLog /proc/self/fd/1 combined 51 | 52 | 53 | SetHandler application/x-httpd-php 54 | 55 | DirectoryIndex index.php 56 | 57 | DocumentRoot /var/www/html 58 | -------------------------------------------------------------------------------- /legacy/php/5.3/fpm/Dockerfile: -------------------------------------------------------------------------------- 1 | # Dockerfile written by 10up 2 | # 3 | # Work derived from official PHP Docker Library: 4 | # Copyright (c) 2014-2015 Docker, Inc. 5 | 6 | FROM debian:jessie 7 | 8 | # persistent / runtime deps 9 | RUN apt-get update && apt-get install -y ca-certificates curl libssl-dev libxml2-dev libxml2 libpng12-dev libmcrypt-dev php5-memcached --no-install-recommends && rm -r /var/lib/apt/lists/* 10 | 11 | # phpize deps 12 | RUN apt-get update && apt-get install -y autoconf file g++ gcc libc-dev make pkg-config re2c --no-install-recommends && rm -r /var/lib/apt/lists/* 13 | 14 | ENV PHP_INI_DIR /usr/local/etc/php 15 | RUN mkdir -p $PHP_INI_DIR/conf.d 16 | 17 | ENV PHP_EXTRA_CONFIGURE_ARGS --enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data 18 | 19 | ENV GPG_KEYS 0B96609E270F565C13292B24C13C70B87267B52D 0A95E9A026542D53835E3F3A7DEC4E69FC9C83D7 0E604491 20 | RUN set -xe \ 21 | && for key in $GPG_KEYS; do \ 22 | gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ 23 | done 24 | 25 | # compile openssl, otherwise --with-openssl won't work 26 | RUN OPENSSL_VERSION="1.0.2e" \ 27 | && cd /tmp \ 28 | && mkdir openssl \ 29 | && curl -sL "https://www.openssl.org/source/openssl-$OPENSSL_VERSION.tar.gz" -o openssl.tar.gz \ 30 | && curl -sL "https://www.openssl.org/source/openssl-$OPENSSL_VERSION.tar.gz.asc" -o openssl.tar.gz.asc \ 31 | && gpg --verify openssl.tar.gz.asc \ 32 | && tar -xzf openssl.tar.gz -C openssl --strip-components=1 \ 33 | && cd /tmp/openssl \ 34 | && ./config && make && make install \ 35 | && rm -rf /tmp/* 36 | 37 | ENV PHP_VERSION 5.3.29 38 | ENV PHP_FILENAME php-5.3.29.tar.xz 39 | 40 | # php 5.3 needs older autoconf 41 | # --enable-mysqlnd is included below because it's harder to compile after the fact the extensions are (since it's a plugin for several extensions, not an extension in itself) 42 | RUN buildDeps=" \ 43 | autoconf2.13 \ 44 | bzip2 \ 45 | xz-utils \ 46 | libreadline6-dev \ 47 | libcurl4-openssl-dev \ 48 | " \ 49 | && set -x \ 50 | && apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \ 51 | && curl -SL "http://php.net/get/php-$PHP_VERSION.tar.bz2/from/this/mirror" -o "$PHP_FILENAME" \ 52 | && curl -SL "http://php.net/get/php-$PHP_VERSION.tar.bz2.asc/from/this/mirror" -o "$PHP_FILENAME.asc" \ 53 | && gpg --verify "$PHP_FILENAME.asc" \ 54 | && mkdir -p /usr/src/php \ 55 | && tar -xf "$PHP_FILENAME" -C /usr/src/php --strip-components=1 \ 56 | && rm "$PHP_FILENAME"* \ 57 | && cd /usr/src/php \ 58 | && ./configure \ 59 | --with-config-file-path="$PHP_INI_DIR" \ 60 | --with-config-file-scan-dir="$PHP_INI_DIR/conf.d" \ 61 | $PHP_EXTRA_CONFIGURE_ARGS \ 62 | --disable-cgi \ 63 | --enable-mysqlnd \ 64 | --with-mysqli=mysqlnd \ 65 | --with-curl \ 66 | --with-openssl=/usr/local/ssl \ 67 | --with-readline \ 68 | --with-zlib \ 69 | && make -j"$(nproc)" \ 70 | && make install \ 71 | && { find /usr/local/bin /usr/local/sbin -type f -executable -exec strip --strip-all '{}' + || true; } \ 72 | && make clean \ 73 | && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false -o APT::AutoRemove::SuggestsImportant=false $buildDeps \ 74 | && apt-get autoremove 75 | 76 | COPY docker-php-ext-* /usr/local/bin/ 77 | 78 | ENV extensionDeps=" \ 79 | libmysqlclient-dev \ 80 | rsync \ 81 | " 82 | 83 | RUN extensions=" \ 84 | gd \ 85 | mysqli \ 86 | soap \ 87 | mcrypt \ 88 | mbstring \ 89 | "; \ 90 | apt-get update && apt-get install -y --no-install-recommends $extensionDeps \ 91 | && docker-php-ext-install $extensions \ 92 | && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false -o APT::AutoRemove::SuggestsImportant=false $extensionDeps \ 93 | && apt-get autoremove 94 | 95 | ENV peclDeps=" \ 96 | libmemcached-dev \ 97 | " 98 | 99 | RUN apt-get update && apt-get install -y --no-install-recommends $peclDeps \ 100 | && pecl install redis && echo extension=redis.so > $PHP_INI_DIR/conf.d/ext-redis.ini \ 101 | && pecl install memcached && echo extension=memcached.so > $PHP_INI_DIR/conf.d/ext-memcached.ini \ 102 | && pecl install memcache && echo extension=memcache.so > $PHP_INI_DIR/conf.d/ext-memcache.ini \ 103 | # && pecl install apcu && echo extension=apcu.so > $PHP_INI_DIR/conf.d/ext-apcu.ini \ 104 | && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false -o APT::AutoRemove::SuggestsImportant=false $peclDeps \ 105 | && apt-get autoremove 106 | 107 | MAINTAINER 10up 108 | 109 | WORKDIR /var/www/html 110 | COPY php-fpm.conf /usr/local/etc/ 111 | 112 | EXPOSE 9053 113 | CMD ["php-fpm"] 114 | -------------------------------------------------------------------------------- /legacy/php/5.3/fpm/docker-php-ext-configure: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | ext="$1" 5 | extDir="/usr/src/php/ext/$ext" 6 | if [ -z "$ext" -o ! -d "$extDir" ]; then 7 | echo >&2 "usage: $0 ext-name [configure flags]" 8 | echo >&2 " ie: $0 gd --with-jpeg-dir=/usr/local/something" 9 | echo >&2 10 | echo >&2 'Possible values for ext-name:' 11 | echo >&2 $(find /usr/src/php/ext -mindepth 2 -maxdepth 2 -type f -name 'config.m4' | cut -d/ -f6 | sort) 12 | exit 1 13 | fi 14 | shift 15 | 16 | set -x 17 | cd "$extDir" 18 | phpize 19 | ./configure "$@" 20 | -------------------------------------------------------------------------------- /legacy/php/5.3/fpm/docker-php-ext-enable: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | cd "$(php -r 'echo ini_get("extension_dir");')" 5 | 6 | usage() { 7 | echo "usage: $0 module-name [module-name ...]" 8 | echo " ie: $0 gd mysqli" 9 | echo " $0 pdo pdo_mysql" 10 | echo 11 | echo 'Possible values for module-name:' 12 | echo $(find -maxdepth 1 -type f -name '*.so' -exec basename '{}' ';' | sort) 13 | } 14 | 15 | modules=() 16 | while [ $# -gt 0 ]; do 17 | module="$1" 18 | shift 19 | if [ -z "$module" ]; then 20 | continue 21 | fi 22 | if [ -f "$module.so" -a ! -f "$module" ]; then 23 | # allow ".so" to be optional 24 | module+='.so' 25 | fi 26 | if [ ! -f "$module" ]; then 27 | echo >&2 "error: $(readlink -f "$module") does not exist" 28 | echo >&2 29 | usage >&2 30 | exit 1 31 | fi 32 | modules+=( "$module" ) 33 | done 34 | 35 | if [ "${#modules[@]}" -eq 0 ]; then 36 | usage >&2 37 | exit 1 38 | fi 39 | 40 | for module in "${modules[@]}"; do 41 | if grep -q zend_extension_entry "$module"; then 42 | # https://wiki.php.net/internals/extensions#loading_zend_extensions 43 | line="zend_extension=$(readlink -f "$module")" 44 | else 45 | line="extension=$module" 46 | fi 47 | 48 | ext="$(basename "$module")" 49 | ext="${ext%.*}" 50 | if php -r 'exit(extension_loaded("'"$ext"'") ? 0 : 1);'; then 51 | # this isn't perfect, but it's better than nothing 52 | # (for example, 'opcache.so' presents inside PHP as 'Zend OPcache', not 'opcache') 53 | echo >&2 54 | echo >&2 "warning: $ext ($module) is already loaded!" 55 | echo >&2 56 | continue 57 | fi 58 | 59 | ini="/usr/local/etc/php/conf.d/docker-php-ext-$ext.ini" 60 | if ! grep -q "$line" "$ini" 2>/dev/null; then 61 | echo "$line" >> "$ini" 62 | fi 63 | done 64 | -------------------------------------------------------------------------------- /legacy/php/5.3/fpm/docker-php-ext-install: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | cd /usr/src/php/ext 5 | 6 | usage() { 7 | echo "usage: $0 ext-name [ext-name ...]" 8 | echo " ie: $0 gd mysqli" 9 | echo " $0 pdo pdo_mysql" 10 | echo 11 | echo 'if custom ./configure arguments are necessary, see docker-php-ext-configure' 12 | echo 13 | echo 'Possible values for ext-name:' 14 | echo $(find /usr/src/php/ext -mindepth 2 -maxdepth 2 -type f -name 'config.m4' | cut -d/ -f6 | sort) 15 | } 16 | 17 | exts=() 18 | while [ $# -gt 0 ]; do 19 | ext="$1" 20 | shift 21 | if [ -z "$ext" ]; then 22 | continue 23 | fi 24 | if [ ! -d "$ext" ]; then 25 | echo >&2 "error: $(pwd -P)/$ext does not exist" 26 | echo >&2 27 | usage >&2 28 | exit 1 29 | fi 30 | exts+=( "$ext" ) 31 | done 32 | 33 | if [ "${#exts[@]}" -eq 0 ]; then 34 | usage >&2 35 | exit 1 36 | fi 37 | 38 | for ext in "${exts[@]}"; do 39 | ( 40 | cd "$ext" 41 | [ -e Makefile ] || docker-php-ext-configure "$ext" 42 | make 43 | make install 44 | find modules -maxdepth 1 -name '*.so' -exec basename '{}' ';' | xargs --no-run-if-empty --verbose docker-php-ext-enable 45 | make clean 46 | ) 47 | done 48 | -------------------------------------------------------------------------------- /legacy/php/5.3/fpm/php-fpm.conf: -------------------------------------------------------------------------------- 1 | ; This file was initially adapated from the output of: (on PHP 5.6) 2 | ; grep -vE '^;|^ *$' /usr/local/etc/php-fpm.conf.default 3 | 4 | [global] 5 | 6 | error_log = /proc/self/fd/2 7 | daemonize = no 8 | 9 | [www] 10 | 11 | ; if we send this to /proc/self/fd/1, it never appears 12 | access.log = /proc/self/fd/2 13 | 14 | user = www-data 15 | group = www-data 16 | 17 | listen = 9053 18 | 19 | pm = dynamic 20 | pm.max_children = 5 21 | pm.start_servers = 2 22 | pm.min_spare_servers = 1 23 | pm.max_spare_servers = 3 24 | 25 | ; Ensure worker stdout and stderr are sent to the main error log. 26 | catch_workers_output = yes -------------------------------------------------------------------------------- /legacy/php/5.4/apache/Dockerfile: -------------------------------------------------------------------------------- 1 | # Dockerfile written by 10up 2 | # 3 | # Work derived from official PHP Docker Library: 4 | # Copyright (c) 2014-2015 Docker, Inc. 5 | 6 | FROM debian:jessie 7 | 8 | # persistent / runtime deps 9 | RUN apt-get update && apt-get install -y ca-certificates curl librecode0 libsqlite3-0 libxml2 --no-install-recommends && rm -r /var/lib/apt/lists/* 10 | 11 | # phpize deps 12 | RUN apt-get update && apt-get install -y autoconf file g++ gcc libc-dev make pkg-config re2c --no-install-recommends && rm -r /var/lib/apt/lists/* 13 | 14 | ENV PHP_INI_DIR /usr/local/etc/php 15 | RUN mkdir -p $PHP_INI_DIR/conf.d 16 | 17 | #### 18 | RUN apt-get update && apt-get install -y apache2-bin apache2.2-common --no-install-recommends && rm -rf /var/lib/apt/lists/* 19 | 20 | RUN rm -rf /var/www/html && mkdir -p /var/lock/apache2 /var/run/apache2 /var/log/apache2 /var/www/html && chown -R www-data:www-data /var/lock/apache2 /var/run/apache2 /var/log/apache2 /var/www/html 21 | 22 | # Apache + PHP requires preforking Apache for best results 23 | RUN a2dismod mpm_event && a2enmod mpm_prefork 24 | 25 | RUN mv /etc/apache2/apache2.conf /etc/apache2/apache2.conf.dist && rm /etc/apache2/conf-enabled/* /etc/apache2/sites-enabled/* 26 | COPY apache2.conf /etc/apache2/apache2.conf 27 | # it'd be nice if we could not COPY apache2.conf until the end of the Dockerfile, but its contents are checked by PHP during compilation 28 | 29 | ENV PHP_EXTRA_BUILD_DEPS apache2-dev 30 | ENV PHP_EXTRA_CONFIGURE_ARGS --with-apxs2 31 | #### 32 | 33 | ENV GPG_KEYS F38252826ACD957EF380D39F2F7956BC5DA04B5D 34 | RUN set -xe \ 35 | && for key in $GPG_KEYS; do \ 36 | gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ 37 | done 38 | 39 | ENV PHP_VERSION 5.4.45 40 | 41 | # --enable-mysqlnd is included below because it's harder to compile after the fact the extensions are (since it's a plugin for several extensions, not an extension in itself) 42 | RUN buildDeps=" \ 43 | $PHP_EXTRA_BUILD_DEPS \ 44 | bzip2 \ 45 | libcurl4-openssl-dev \ 46 | libreadline6-dev \ 47 | librecode-dev \ 48 | libsqlite3-dev \ 49 | libssl-dev \ 50 | libxml2-dev \ 51 | " \ 52 | && set -x \ 53 | && apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \ 54 | && curl -SL "http://php.net/get/php-$PHP_VERSION.tar.bz2/from/this/mirror" -o php.tar.bz2 \ 55 | && curl -SL "http://php.net/get/php-$PHP_VERSION.tar.bz2.asc/from/this/mirror" -o php.tar.bz2.asc \ 56 | && gpg --verify php.tar.bz2.asc \ 57 | && mkdir -p /usr/src/php \ 58 | && tar -xof php.tar.bz2 -C /usr/src/php --strip-components=1 \ 59 | && rm php.tar.bz2* \ 60 | && cd /usr/src/php \ 61 | && ./configure \ 62 | --with-config-file-path="$PHP_INI_DIR" \ 63 | --with-config-file-scan-dir="$PHP_INI_DIR/conf.d" \ 64 | $PHP_EXTRA_CONFIGURE_ARGS \ 65 | --disable-cgi \ 66 | --enable-mysqlnd \ 67 | --with-curl \ 68 | --with-openssl \ 69 | --with-readline \ 70 | --with-recode \ 71 | --with-zlib \ 72 | && make -j"$(nproc)" \ 73 | && make install \ 74 | && { find /usr/local/bin /usr/local/sbin -type f -executable -exec strip --strip-all '{}' + || true; } \ 75 | && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false -o APT::AutoRemove::SuggestsImportant=false $buildDeps \ 76 | && make clean 77 | 78 | COPY docker-php-ext-* /usr/local/bin/ 79 | 80 | #### 81 | COPY apache2-foreground /usr/local/bin/ 82 | WORKDIR /var/www/html 83 | 84 | EXPOSE 80 85 | CMD ["apache2-foreground"] 86 | #### 87 | -------------------------------------------------------------------------------- /legacy/php/5.4/apache/apache2-foreground: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | # Apache gets grumpy about PID files pre-existing 5 | rm -f /var/run/apache2/apache2.pid 6 | 7 | exec apache2 -DFOREGROUND 8 | -------------------------------------------------------------------------------- /legacy/php/5.4/apache/apache2.conf: -------------------------------------------------------------------------------- 1 | # see http://sources.debian.net/src/apache2/2.4.10-1/debian/config-dir/apache2.conf 2 | 3 | Mutex file:/var/lock/apache2 default 4 | PidFile /var/run/apache2/apache2.pid 5 | Timeout 300 6 | KeepAlive On 7 | MaxKeepAliveRequests 100 8 | KeepAliveTimeout 5 9 | User www-data 10 | Group www-data 11 | HostnameLookups Off 12 | ErrorLog /proc/self/fd/2 13 | LogLevel warn 14 | 15 | IncludeOptional mods-enabled/*.load 16 | IncludeOptional mods-enabled/*.conf 17 | 18 | # ports.conf 19 | Listen 80 20 | 21 | Listen 443 22 | 23 | 24 | Listen 443 25 | 26 | 27 | 28 | Options FollowSymLinks 29 | AllowOverride None 30 | Require all denied 31 | 32 | 33 | 34 | AllowOverride All 35 | Require all granted 36 | 37 | 38 | DocumentRoot /var/www/html 39 | 40 | AccessFileName .htaccess 41 | 42 | Require all denied 43 | 44 | 45 | LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined 46 | LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined 47 | LogFormat "%h %l %u %t \"%r\" %>s %O" common 48 | LogFormat "%{Referer}i -> %U" referer 49 | LogFormat "%{User-agent}i" agent 50 | 51 | CustomLog /proc/self/fd/1 combined 52 | 53 | 54 | SetHandler application/x-httpd-php 55 | 56 | 57 | # Multiple DirectoryIndex directives within the same context will add 58 | # to the list of resources to look for rather than replace 59 | # https://httpd.apache.org/docs/current/mod/mod_dir.html#directoryindex 60 | DirectoryIndex disabled 61 | DirectoryIndex index.php index.html 62 | 63 | IncludeOptional conf-enabled/*.conf 64 | IncludeOptional sites-enabled/*.conf 65 | -------------------------------------------------------------------------------- /legacy/php/5.4/apache/docker-php-ext-configure: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | ext="$1" 5 | extDir="/usr/src/php/ext/$ext" 6 | if [ -z "$ext" -o ! -d "$extDir" ]; then 7 | echo >&2 "usage: $0 ext-name [configure flags]" 8 | echo >&2 " ie: $0 gd --with-jpeg-dir=/usr/local/something" 9 | echo >&2 10 | echo >&2 'Possible values for ext-name:' 11 | echo >&2 $(find /usr/src/php/ext -mindepth 2 -maxdepth 2 -type f -name 'config.m4' | cut -d/ -f6 | sort) 12 | exit 1 13 | fi 14 | shift 15 | 16 | set -x 17 | cd "$extDir" 18 | phpize 19 | ./configure "$@" 20 | -------------------------------------------------------------------------------- /legacy/php/5.4/apache/docker-php-ext-enable: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | cd "$(php -r 'echo ini_get("extension_dir");')" 5 | 6 | usage() { 7 | echo "usage: $0 module-name [module-name ...]" 8 | echo " ie: $0 gd mysqli" 9 | echo " $0 pdo pdo_mysql" 10 | echo 11 | echo 'Possible values for module-name:' 12 | echo $(find -maxdepth 1 -type f -name '*.so' -exec basename '{}' ';' | sort) 13 | } 14 | 15 | modules=() 16 | while [ $# -gt 0 ]; do 17 | module="$1" 18 | shift 19 | if [ -z "$module" ]; then 20 | continue 21 | fi 22 | if [ -f "$module.so" -a ! -f "$module" ]; then 23 | # allow ".so" to be optional 24 | module+='.so' 25 | fi 26 | if [ ! -f "$module" ]; then 27 | echo >&2 "error: $(readlink -f "$module") does not exist" 28 | echo >&2 29 | usage >&2 30 | exit 1 31 | fi 32 | modules+=( "$module" ) 33 | done 34 | 35 | if [ "${#modules[@]}" -eq 0 ]; then 36 | usage >&2 37 | exit 1 38 | fi 39 | 40 | for module in "${modules[@]}"; do 41 | if grep -q zend_extension_entry "$module"; then 42 | # https://wiki.php.net/internals/extensions#loading_zend_extensions 43 | line="zend_extension=$(readlink -f "$module")" 44 | else 45 | line="extension=$module" 46 | fi 47 | 48 | ext="$(basename "$module")" 49 | ext="${ext%.*}" 50 | if php -r 'exit(extension_loaded("'"$ext"'") ? 0 : 1);'; then 51 | # this isn't perfect, but it's better than nothing 52 | # (for example, 'opcache.so' presents inside PHP as 'Zend OPcache', not 'opcache') 53 | echo >&2 54 | echo >&2 "warning: $ext ($module) is already loaded!" 55 | echo >&2 56 | continue 57 | fi 58 | 59 | ini="/usr/local/etc/php/conf.d/docker-php-ext-$ext.ini" 60 | if ! grep -q "$line" "$ini" 2>/dev/null; then 61 | echo "$line" >> "$ini" 62 | fi 63 | done 64 | -------------------------------------------------------------------------------- /legacy/php/5.4/apache/docker-php-ext-install: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | cd /usr/src/php/ext 5 | 6 | usage() { 7 | echo "usage: $0 ext-name [ext-name ...]" 8 | echo " ie: $0 gd mysqli" 9 | echo " $0 pdo pdo_mysql" 10 | echo 11 | echo 'if custom ./configure arguments are necessary, see docker-php-ext-configure' 12 | echo 13 | echo 'Possible values for ext-name:' 14 | echo $(find /usr/src/php/ext -mindepth 2 -maxdepth 2 -type f -name 'config.m4' | cut -d/ -f6 | sort) 15 | } 16 | 17 | exts=() 18 | while [ $# -gt 0 ]; do 19 | ext="$1" 20 | shift 21 | if [ -z "$ext" ]; then 22 | continue 23 | fi 24 | if [ ! -d "$ext" ]; then 25 | echo >&2 "error: $(pwd -P)/$ext does not exist" 26 | echo >&2 27 | usage >&2 28 | exit 1 29 | fi 30 | exts+=( "$ext" ) 31 | done 32 | 33 | if [ "${#exts[@]}" -eq 0 ]; then 34 | usage >&2 35 | exit 1 36 | fi 37 | 38 | for ext in "${exts[@]}"; do 39 | ( 40 | cd "$ext" 41 | [ -e Makefile ] || docker-php-ext-configure "$ext" 42 | make 43 | make install 44 | find modules -maxdepth 1 -name '*.so' -exec basename '{}' ';' | xargs --no-run-if-empty --verbose docker-php-ext-enable 45 | make clean 46 | ) 47 | done 48 | -------------------------------------------------------------------------------- /legacy/php/5.4/fpm/Dockerfile: -------------------------------------------------------------------------------- 1 | # Dockerfile written by 10up 2 | # 3 | # Work derived from official PHP Docker Library: 4 | # Copyright (c) 2014-2015 Docker, Inc. 5 | 6 | FROM debian:jessie 7 | 8 | # persistent / runtime deps 9 | RUN apt-get update && apt-get install -y ca-certificates curl libssl-dev libxml2-dev libxml2 libpng12-dev libmcrypt-dev php5-memcached --no-install-recommends && rm -r /var/lib/apt/lists/* 10 | 11 | # phpize deps 12 | RUN apt-get update && apt-get install -y autoconf file g++ gcc libc-dev make pkg-config re2c --no-install-recommends && rm -r /var/lib/apt/lists/* 13 | 14 | ENV PHP_INI_DIR /usr/local/etc/php 15 | RUN mkdir -p $PHP_INI_DIR/conf.d 16 | 17 | ENV PHP_EXTRA_CONFIGURE_ARGS --enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data 18 | 19 | ENV GPG_KEYS F38252826ACD957EF380D39F2F7956BC5DA04B5D 20 | RUN set -xe \ 21 | && for key in $GPG_KEYS; do \ 22 | gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ 23 | done 24 | 25 | ENV PHP_VERSION 5.4.45 26 | ENV PHP_FILENAME php-5.4.45.tar.xz 27 | 28 | # --enable-mysqlnd is included below because it's harder to compile after the fact the extensions are (since it's a plugin for several extensions, not an extension in itself) 29 | RUN buildDeps=" \ 30 | bzip2 \ 31 | xz-utils \ 32 | libreadline6-dev \ 33 | libcurl4-openssl-dev \ 34 | " \ 35 | && set -x \ 36 | && apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \ 37 | && curl -SL "http://php.net/get/php-$PHP_VERSION.tar.bz2/from/this/mirror" -o "$PHP_FILENAME" \ 38 | && curl -SL "http://php.net/get/php-$PHP_VERSION.tar.bz2.asc/from/this/mirror" -o "$PHP_FILENAME.asc" \ 39 | && gpg --verify "$PHP_FILENAME.asc" \ 40 | && mkdir -p /usr/src/php \ 41 | && tar -xf "$PHP_FILENAME" -C /usr/src/php --strip-components=1 \ 42 | && rm "$PHP_FILENAME"* \ 43 | && cd /usr/src/php \ 44 | && ./configure \ 45 | --with-config-file-path="$PHP_INI_DIR" \ 46 | --with-config-file-scan-dir="$PHP_INI_DIR/conf.d" \ 47 | $PHP_EXTRA_CONFIGURE_ARGS \ 48 | --disable-cgi \ 49 | --enable-mysqlnd \ 50 | --with-curl \ 51 | --with-openssl \ 52 | --with-readline \ 53 | --with-zlib \ 54 | && make -j"$(nproc)" \ 55 | && make install \ 56 | && { find /usr/local/bin /usr/local/sbin -type f -executable -exec strip --strip-all '{}' + || true; } \ 57 | && make clean \ 58 | && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false -o APT::AutoRemove::SuggestsImportant=false $buildDeps \ 59 | && apt-get autoremove 60 | 61 | COPY docker-php-ext-* /usr/local/bin/ 62 | 63 | ENV extensionDeps=" \ 64 | rsync \ 65 | " 66 | 67 | RUN extensions=" \ 68 | gd \ 69 | mysqli \ 70 | soap \ 71 | mcrypt \ 72 | mbstring \ 73 | "; \ 74 | apt-get update && apt-get install -y --no-install-recommends $extensionDeps \ 75 | && docker-php-ext-install $extensions \ 76 | && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false -o APT::AutoRemove::SuggestsImportant=false $extensionDeps \ 77 | && apt-get autoremove 78 | 79 | ENV peclDeps=" \ 80 | libmemcached-dev \ 81 | " 82 | RUN apt-get update && apt-get install -y --no-install-recommends $peclDeps \ 83 | && pecl install redis && echo extension=redis.so > $PHP_INI_DIR/conf.d/ext-redis.ini \ 84 | && pecl install memcached && echo extension=memcached.so > $PHP_INI_DIR/conf.d/ext-memcached.ini \ 85 | && pecl install memcache && echo extension=memcache.so > $PHP_INI_DIR/conf.d/ext-memcache.ini \ 86 | # && pecl install apcu && echo extension=apcu.so > $PHP_INI_DIR/conf.d/ext-apcu.ini \ 87 | && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false -o APT::AutoRemove::SuggestsImportant=false $peclDeps \ 88 | && apt-get autoremove 89 | 90 | MAINTAINER 10up 91 | 92 | WORKDIR /var/www/html 93 | COPY php-fpm.conf /usr/local/etc/ 94 | 95 | EXPOSE 9054 96 | CMD ["php-fpm"] 97 | -------------------------------------------------------------------------------- /legacy/php/5.4/fpm/docker-php-ext-configure: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | ext="$1" 5 | extDir="/usr/src/php/ext/$ext" 6 | if [ -z "$ext" -o ! -d "$extDir" ]; then 7 | echo >&2 "usage: $0 ext-name [configure flags]" 8 | echo >&2 " ie: $0 gd --with-jpeg-dir=/usr/local/something" 9 | echo >&2 10 | echo >&2 'Possible values for ext-name:' 11 | echo >&2 $(find /usr/src/php/ext -mindepth 2 -maxdepth 2 -type f -name 'config.m4' | cut -d/ -f6 | sort) 12 | exit 1 13 | fi 14 | shift 15 | 16 | set -x 17 | cd "$extDir" 18 | phpize 19 | ./configure "$@" 20 | -------------------------------------------------------------------------------- /legacy/php/5.4/fpm/docker-php-ext-enable: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | cd "$(php -r 'echo ini_get("extension_dir");')" 5 | 6 | usage() { 7 | echo "usage: $0 module-name [module-name ...]" 8 | echo " ie: $0 gd mysqli" 9 | echo " $0 pdo pdo_mysql" 10 | echo 11 | echo 'Possible values for module-name:' 12 | echo $(find -maxdepth 1 -type f -name '*.so' -exec basename '{}' ';' | sort) 13 | } 14 | 15 | modules=() 16 | while [ $# -gt 0 ]; do 17 | module="$1" 18 | shift 19 | if [ -z "$module" ]; then 20 | continue 21 | fi 22 | if [ -f "$module.so" -a ! -f "$module" ]; then 23 | # allow ".so" to be optional 24 | module+='.so' 25 | fi 26 | if [ ! -f "$module" ]; then 27 | echo >&2 "error: $(readlink -f "$module") does not exist" 28 | echo >&2 29 | usage >&2 30 | exit 1 31 | fi 32 | modules+=( "$module" ) 33 | done 34 | 35 | if [ "${#modules[@]}" -eq 0 ]; then 36 | usage >&2 37 | exit 1 38 | fi 39 | 40 | for module in "${modules[@]}"; do 41 | if grep -q zend_extension_entry "$module"; then 42 | # https://wiki.php.net/internals/extensions#loading_zend_extensions 43 | line="zend_extension=$(readlink -f "$module")" 44 | else 45 | line="extension=$module" 46 | fi 47 | 48 | ext="$(basename "$module")" 49 | ext="${ext%.*}" 50 | if php -r 'exit(extension_loaded("'"$ext"'") ? 0 : 1);'; then 51 | # this isn't perfect, but it's better than nothing 52 | # (for example, 'opcache.so' presents inside PHP as 'Zend OPcache', not 'opcache') 53 | echo >&2 54 | echo >&2 "warning: $ext ($module) is already loaded!" 55 | echo >&2 56 | continue 57 | fi 58 | 59 | ini="/usr/local/etc/php/conf.d/docker-php-ext-$ext.ini" 60 | if ! grep -q "$line" "$ini" 2>/dev/null; then 61 | echo "$line" >> "$ini" 62 | fi 63 | done 64 | -------------------------------------------------------------------------------- /legacy/php/5.4/fpm/docker-php-ext-install: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | cd /usr/src/php/ext 5 | 6 | usage() { 7 | echo "usage: $0 ext-name [ext-name ...]" 8 | echo " ie: $0 gd mysqli" 9 | echo " $0 pdo pdo_mysql" 10 | echo 11 | echo 'if custom ./configure arguments are necessary, see docker-php-ext-configure' 12 | echo 13 | echo 'Possible values for ext-name:' 14 | echo $(find /usr/src/php/ext -mindepth 2 -maxdepth 2 -type f -name 'config.m4' | cut -d/ -f6 | sort) 15 | } 16 | 17 | exts=() 18 | while [ $# -gt 0 ]; do 19 | ext="$1" 20 | shift 21 | if [ -z "$ext" ]; then 22 | continue 23 | fi 24 | if [ ! -d "$ext" ]; then 25 | echo >&2 "error: $(pwd -P)/$ext does not exist" 26 | echo >&2 27 | usage >&2 28 | exit 1 29 | fi 30 | exts+=( "$ext" ) 31 | done 32 | 33 | if [ "${#exts[@]}" -eq 0 ]; then 34 | usage >&2 35 | exit 1 36 | fi 37 | 38 | for ext in "${exts[@]}"; do 39 | ( 40 | cd "$ext" 41 | [ -e Makefile ] || docker-php-ext-configure "$ext" 42 | make 43 | make install 44 | find modules -maxdepth 1 -name '*.so' -exec basename '{}' ';' | xargs --no-run-if-empty --verbose docker-php-ext-enable 45 | make clean 46 | ) 47 | done 48 | -------------------------------------------------------------------------------- /legacy/php/5.4/fpm/php-fpm.conf: -------------------------------------------------------------------------------- 1 | ; This file was initially adapated from the output of: (on PHP 5.6) 2 | ; grep -vE '^;|^ *$' /usr/local/etc/php-fpm.conf.default 3 | 4 | [global] 5 | 6 | error_log = /proc/self/fd/2 7 | daemonize = no 8 | 9 | [www] 10 | 11 | ; if we send this to /proc/self/fd/1, it never appears 12 | access.log = /proc/self/fd/2 13 | 14 | user = www-data 15 | group = www-data 16 | 17 | listen = 9054 18 | 19 | pm = dynamic 20 | pm.max_children = 5 21 | pm.start_servers = 2 22 | pm.min_spare_servers = 1 23 | pm.max_spare_servers = 3 24 | 25 | clear_env = no 26 | 27 | ; Ensure worker stdout and stderr are sent to the main error log. 28 | catch_workers_output = yes -------------------------------------------------------------------------------- /legacy/php/5.5/apache/Dockerfile: -------------------------------------------------------------------------------- 1 | # Dockerfile written by 10up 2 | # 3 | # Work derived from official PHP Docker Library: 4 | # Copyright (c) 2014-2015 Docker, Inc. 5 | 6 | FROM debian:jessie 7 | 8 | # persistent / runtime deps 9 | RUN apt-get update && apt-get install -y ca-certificates curl librecode0 libsqlite3-0 libxml2 --no-install-recommends && rm -r /var/lib/apt/lists/* 10 | 11 | # phpize deps 12 | RUN apt-get update && apt-get install -y autoconf file g++ gcc libc-dev make pkg-config re2c --no-install-recommends && rm -r /var/lib/apt/lists/* 13 | 14 | ENV PHP_INI_DIR /usr/local/etc/php 15 | RUN mkdir -p $PHP_INI_DIR/conf.d 16 | 17 | RUN apt-get update && apt-get install -y apache2-bin apache2.2-common --no-install-recommends && rm -rf /var/lib/apt/lists/* 18 | 19 | RUN rm -rf /var/www/html && mkdir -p /var/lock/apache2 /var/run/apache2 /var/log/apache2 /var/www/html && chown -R www-data:www-data /var/lock/apache2 /var/run/apache2 /var/log/apache2 /var/www/html 20 | 21 | # Apache + PHP requires preforking Apache for best results 22 | RUN a2dismod mpm_event && a2enmod mpm_prefork 23 | 24 | RUN mv /etc/apache2/apache2.conf /etc/apache2/apache2.conf.dist && rm /etc/apache2/conf-enabled/* /etc/apache2/sites-enabled/* 25 | COPY apache2.conf /etc/apache2/apache2.conf 26 | # it'd be nice if we could not COPY apache2.conf until the end of the Dockerfile, but its contents are checked by PHP during compilation 27 | 28 | ENV PHP_EXTRA_BUILD_DEPS apache2-dev 29 | ENV PHP_EXTRA_CONFIGURE_ARGS --with-apxs2 30 | 31 | ENV GPG_KEYS 0B96609E270F565C13292B24C13C70B87267B52D 0BD78B5F97500D450838F95DFE857D9A90D90EC1 F38252826ACD957EF380D39F2F7956BC5DA04B5D 32 | RUN set -xe \ 33 | && for key in $GPG_KEYS; do \ 34 | gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ 35 | done 36 | 37 | ENV PHP_VERSION 5.5.30 38 | ENV PHP_FILENAME php-5.5.30.tar.xz 39 | ENV PHP_SHA256 d00dc06fa5e0f3de048fb0cf940b3cc59b43b3f8cad825d4fffb35503cf2e8f2 40 | 41 | # --enable-mysqlnd is included below because it's harder to compile after the fact the extensions are (since it's a plugin for several extensions, not an extension in itself) 42 | RUN buildDeps=" \ 43 | $PHP_EXTRA_BUILD_DEPS \ 44 | libcurl4-openssl-dev \ 45 | libreadline6-dev \ 46 | librecode-dev \ 47 | libsqlite3-dev \ 48 | libssl-dev \ 49 | libxml2-dev \ 50 | xz-utils \ 51 | " \ 52 | && set -x \ 53 | && apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \ 54 | && curl -fSL "http://php.net/get/$PHP_FILENAME/from/this/mirror" -o "$PHP_FILENAME" \ 55 | && echo "$PHP_SHA256 *$PHP_FILENAME" | sha256sum -c - \ 56 | && curl -fSL "http://php.net/get/$PHP_FILENAME.asc/from/this/mirror" -o "$PHP_FILENAME.asc" \ 57 | && gpg --verify "$PHP_FILENAME.asc" \ 58 | && mkdir -p /usr/src/php \ 59 | && tar -xf "$PHP_FILENAME" -C /usr/src/php --strip-components=1 \ 60 | && rm "$PHP_FILENAME"* \ 61 | && cd /usr/src/php \ 62 | && ./configure \ 63 | --with-config-file-path="$PHP_INI_DIR" \ 64 | --with-config-file-scan-dir="$PHP_INI_DIR/conf.d" \ 65 | $PHP_EXTRA_CONFIGURE_ARGS \ 66 | --disable-cgi \ 67 | --enable-mysqlnd \ 68 | --with-curl \ 69 | --with-openssl \ 70 | --with-readline \ 71 | --with-recode \ 72 | --with-zlib \ 73 | && make -j"$(nproc)" \ 74 | && make install \ 75 | && { find /usr/local/bin /usr/local/sbin -type f -executable -exec strip --strip-all '{}' + || true; } \ 76 | && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false -o APT::AutoRemove::SuggestsImportant=false $buildDeps \ 77 | && make clean 78 | 79 | COPY docker-php-ext-* /usr/local/bin/ 80 | 81 | MAINTAINER 10up 82 | 83 | COPY apache2-foreground /usr/local/bin/ 84 | WORKDIR /var/www/html 85 | 86 | EXPOSE 80 87 | CMD ["apache2-foreground"] 88 | -------------------------------------------------------------------------------- /legacy/php/5.5/apache/apache2-foreground: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | # Apache gets grumpy about PID files pre-existing 5 | rm -f /var/run/apache2/apache2.pid 6 | 7 | exec apache2 -DFOREGROUND 8 | -------------------------------------------------------------------------------- /legacy/php/5.5/apache/apache2.conf: -------------------------------------------------------------------------------- 1 | # see http://sources.debian.net/src/apache2/2.4.10-1/debian/config-dir/apache2.conf 2 | 3 | Mutex file:/var/lock/apache2 default 4 | PidFile /var/run/apache2/apache2.pid 5 | Timeout 300 6 | KeepAlive On 7 | MaxKeepAliveRequests 100 8 | KeepAliveTimeout 5 9 | User www-data 10 | Group www-data 11 | HostnameLookups Off 12 | ErrorLog /proc/self/fd/2 13 | LogLevel warn 14 | 15 | IncludeOptional mods-enabled/*.load 16 | IncludeOptional mods-enabled/*.conf 17 | 18 | # ports.conf 19 | Listen 80 20 | 21 | Listen 443 22 | 23 | 24 | Listen 443 25 | 26 | 27 | 28 | Options FollowSymLinks 29 | AllowOverride None 30 | Require all denied 31 | 32 | 33 | 34 | AllowOverride All 35 | Require all granted 36 | 37 | 38 | DocumentRoot /var/www/html 39 | 40 | AccessFileName .htaccess 41 | 42 | Require all denied 43 | 44 | 45 | LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined 46 | LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined 47 | LogFormat "%h %l %u %t \"%r\" %>s %O" common 48 | LogFormat "%{Referer}i -> %U" referer 49 | LogFormat "%{User-agent}i" agent 50 | 51 | CustomLog /proc/self/fd/1 combined 52 | 53 | 54 | SetHandler application/x-httpd-php 55 | 56 | 57 | # Multiple DirectoryIndex directives within the same context will add 58 | # to the list of resources to look for rather than replace 59 | # https://httpd.apache.org/docs/current/mod/mod_dir.html#directoryindex 60 | DirectoryIndex disabled 61 | DirectoryIndex index.php index.html 62 | 63 | IncludeOptional conf-enabled/*.conf 64 | IncludeOptional sites-enabled/*.conf 65 | -------------------------------------------------------------------------------- /legacy/php/5.5/apache/docker-php-ext-configure: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | ext="$1" 5 | extDir="/usr/src/php/ext/$ext" 6 | if [ -z "$ext" -o ! -d "$extDir" ]; then 7 | echo >&2 "usage: $0 ext-name [configure flags]" 8 | echo >&2 " ie: $0 gd --with-jpeg-dir=/usr/local/something" 9 | echo >&2 10 | echo >&2 'Possible values for ext-name:' 11 | echo >&2 $(find /usr/src/php/ext -mindepth 2 -maxdepth 2 -type f -name 'config.m4' | cut -d/ -f6 | sort) 12 | exit 1 13 | fi 14 | shift 15 | 16 | set -x 17 | cd "$extDir" 18 | phpize 19 | ./configure "$@" 20 | -------------------------------------------------------------------------------- /legacy/php/5.5/apache/docker-php-ext-enable: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | cd "$(php -r 'echo ini_get("extension_dir");')" 5 | 6 | usage() { 7 | echo "usage: $0 module-name [module-name ...]" 8 | echo " ie: $0 gd mysqli" 9 | echo " $0 pdo pdo_mysql" 10 | echo 11 | echo 'Possible values for module-name:' 12 | echo $(find -maxdepth 1 -type f -name '*.so' -exec basename '{}' ';' | sort) 13 | } 14 | 15 | modules=() 16 | while [ $# -gt 0 ]; do 17 | module="$1" 18 | shift 19 | if [ -z "$module" ]; then 20 | continue 21 | fi 22 | if [ -f "$module.so" -a ! -f "$module" ]; then 23 | # allow ".so" to be optional 24 | module+='.so' 25 | fi 26 | if [ ! -f "$module" ]; then 27 | echo >&2 "error: $(readlink -f "$module") does not exist" 28 | echo >&2 29 | usage >&2 30 | exit 1 31 | fi 32 | modules+=( "$module" ) 33 | done 34 | 35 | if [ "${#modules[@]}" -eq 0 ]; then 36 | usage >&2 37 | exit 1 38 | fi 39 | 40 | for module in "${modules[@]}"; do 41 | if grep -q zend_extension_entry "$module"; then 42 | # https://wiki.php.net/internals/extensions#loading_zend_extensions 43 | line="zend_extension=$(readlink -f "$module")" 44 | else 45 | line="extension=$module" 46 | fi 47 | 48 | ext="$(basename "$module")" 49 | ext="${ext%.*}" 50 | if php -r 'exit(extension_loaded("'"$ext"'") ? 0 : 1);'; then 51 | # this isn't perfect, but it's better than nothing 52 | # (for example, 'opcache.so' presents inside PHP as 'Zend OPcache', not 'opcache') 53 | echo >&2 54 | echo >&2 "warning: $ext ($module) is already loaded!" 55 | echo >&2 56 | continue 57 | fi 58 | 59 | ini="/usr/local/etc/php/conf.d/docker-php-ext-$ext.ini" 60 | if ! grep -q "$line" "$ini" 2>/dev/null; then 61 | echo "$line" >> "$ini" 62 | fi 63 | done 64 | -------------------------------------------------------------------------------- /legacy/php/5.5/apache/docker-php-ext-install: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | cd /usr/src/php/ext 5 | 6 | usage() { 7 | echo "usage: $0 [-jN] ext-name [ext-name ...]" 8 | echo " ie: $0 gd mysqli" 9 | echo " $0 pdo pdo_mysql" 10 | echo " $0 -j5 gd mbstring mysqli pdo pdo_mysql shmop" 11 | echo 12 | echo 'if custom ./configure arguments are necessary, see docker-php-ext-configure' 13 | echo 14 | echo 'Possible values for ext-name:' 15 | echo $(find /usr/src/php/ext -mindepth 2 -maxdepth 2 -type f -name 'config.m4' | cut -d/ -f6 | sort) 16 | } 17 | 18 | opts="$(getopt -o 'h?j:' --long 'help,jobs:' -- "$@" || { usage >&2 && false; })" 19 | eval set -- "$opts" 20 | 21 | j=1 22 | while true; do 23 | flag="$1" 24 | shift 25 | case "$flag" in 26 | --help|-h|'-?') usage && exit 0 ;; 27 | --jobs|-j) j="$1" && shift ;; 28 | --) break ;; 29 | *) 30 | { 31 | echo "error: unknown flag: $flag" 32 | usage 33 | } >&2 34 | exit 1 35 | ;; 36 | esac 37 | done 38 | 39 | exts=() 40 | while [ $# -gt 0 ]; do 41 | ext="$1" 42 | shift 43 | if [ -z "$ext" ]; then 44 | continue 45 | fi 46 | if [ ! -d "$ext" ]; then 47 | echo >&2 "error: $(pwd -P)/$ext does not exist" 48 | echo >&2 49 | usage >&2 50 | exit 1 51 | fi 52 | exts+=( "$ext" ) 53 | done 54 | 55 | if [ "${#exts[@]}" -eq 0 ]; then 56 | usage >&2 57 | exit 1 58 | fi 59 | 60 | for ext in "${exts[@]}"; do 61 | ( 62 | cd "$ext" 63 | [ -e Makefile ] || docker-php-ext-configure "$ext" 64 | make -j"$j" 65 | make -j"$j" install 66 | find modules -maxdepth 1 -name '*.so' -exec basename '{}' ';' | xargs --no-run-if-empty --verbose docker-php-ext-enable 67 | make -j"$j" clean 68 | ) 69 | done 70 | -------------------------------------------------------------------------------- /legacy/php/5.5/fpm/Dockerfile: -------------------------------------------------------------------------------- 1 | # Dockerfile written by 10up 2 | # 3 | # Work derived from official PHP Docker Library: 4 | # Copyright (c) 2014-2015 Docker, Inc. 5 | 6 | FROM debian:jessie 7 | 8 | # persistent / runtime deps 9 | RUN apt-get update && apt-get install -y ca-certificates curl libssl-dev libxml2-dev libxml2 libpng12-dev libmcrypt-dev php5-memcached --no-install-recommends && rm -r /var/lib/apt/lists/* 10 | 11 | # phpize deps 12 | RUN apt-get update && apt-get install -y autoconf file g++ gcc libc-dev make pkg-config re2c --no-install-recommends && rm -r /var/lib/apt/lists/* 13 | 14 | ENV PHP_INI_DIR /usr/local/etc/php 15 | RUN mkdir -p $PHP_INI_DIR/conf.d 16 | 17 | ENV PHP_EXTRA_CONFIGURE_ARGS --enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data 18 | 19 | ENV GPG_KEYS 0B96609E270F565C13292B24C13C70B87267B52D 0BD78B5F97500D450838F95DFE857D9A90D90EC1 F38252826ACD957EF380D39F2F7956BC5DA04B5D 20 | RUN set -xe \ 21 | && for key in $GPG_KEYS; do \ 22 | gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ 23 | done 24 | 25 | ENV PHP_VERSION 5.5.34 26 | ENV PHP_FILENAME php-5.5.34.tar.xz 27 | 28 | # --enable-mysqlnd is included below because it's harder to compile after the fact the extensions are (since it's a plugin for several extensions, not an extension in itself) 29 | RUN buildDeps=" \ 30 | bzip2 \ 31 | xz-utils \ 32 | libreadline6-dev \ 33 | libcurl4-openssl-dev \ 34 | " \ 35 | && set -x \ 36 | && apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \ 37 | && curl -fSL "http://php.net/get/$PHP_FILENAME/from/this/mirror" -o "$PHP_FILENAME" \ 38 | && curl -fSL "http://php.net/get/$PHP_FILENAME.asc/from/this/mirror" -o "$PHP_FILENAME.asc" \ 39 | && gpg --verify "$PHP_FILENAME.asc" \ 40 | && mkdir -p /usr/src/php \ 41 | && tar -xf "$PHP_FILENAME" -C /usr/src/php --strip-components=1 \ 42 | && rm "$PHP_FILENAME"* \ 43 | && cd /usr/src/php \ 44 | && ./configure \ 45 | --with-config-file-path="$PHP_INI_DIR" \ 46 | --with-config-file-scan-dir="$PHP_INI_DIR/conf.d" \ 47 | $PHP_EXTRA_CONFIGURE_ARGS \ 48 | --disable-cgi \ 49 | --enable-mysqlnd \ 50 | --with-curl \ 51 | --with-openssl \ 52 | --with-readline \ 53 | --with-zlib \ 54 | && make -j"$(nproc)" \ 55 | && make install \ 56 | && { find /usr/local/bin /usr/local/sbin -type f -executable -exec strip --strip-all '{}' + || true; } \ 57 | && make clean \ 58 | && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false -o APT::AutoRemove::SuggestsImportant=false $buildDeps \ 59 | && apt-get autoremove 60 | 61 | COPY docker-php-ext-* /usr/local/bin/ 62 | 63 | ENV extensionDeps=" \ 64 | rsync \ 65 | " 66 | 67 | RUN extensions=" \ 68 | gd \ 69 | mysqli \ 70 | soap \ 71 | mcrypt \ 72 | mbstring \ 73 | "; \ 74 | apt-get update && apt-get install -y --force-yes --no-install-recommends $extensionDeps \ 75 | && docker-php-ext-install $extensions \ 76 | && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false -o APT::AutoRemove::SuggestsImportant=false $extensionDeps \ 77 | && apt-get autoremove 78 | 79 | ENV peclDeps=" \ 80 | libmemcached-dev \ 81 | " 82 | RUN apt-get update && apt-get install -y --no-install-recommends $peclDeps \ 83 | && pecl install redis && echo extension=redis.so > $PHP_INI_DIR/conf.d/ext-redis.ini \ 84 | && pecl install memcached && echo extension=memcached.so > $PHP_INI_DIR/conf.d/ext-memcached.ini \ 85 | && pecl install memcache && echo extension=memcache.so > $PHP_INI_DIR/conf.d/ext-memcache.ini \ 86 | # && pecl install apcu && echo extension=apcu.so > $PHP_INI_DIR/conf.d/ext-apcu.ini \ 87 | && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false -o APT::AutoRemove::SuggestsImportant=false $peclDeps \ 88 | && apt-get autoremove 89 | 90 | MAINTAINER 10up 91 | 92 | WORKDIR /var/www/html 93 | COPY php-fpm.conf /usr/local/etc/ 94 | 95 | EXPOSE 9055 96 | CMD ["php-fpm"] 97 | -------------------------------------------------------------------------------- /legacy/php/5.5/fpm/docker-php-ext-configure: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | ext="$1" 5 | extDir="/usr/src/php/ext/$ext" 6 | if [ -z "$ext" -o ! -d "$extDir" ]; then 7 | echo >&2 "usage: $0 ext-name [configure flags]" 8 | echo >&2 " ie: $0 gd --with-jpeg-dir=/usr/local/something" 9 | echo >&2 10 | echo >&2 'Possible values for ext-name:' 11 | echo >&2 $(find /usr/src/php/ext -mindepth 2 -maxdepth 2 -type f -name 'config.m4' | cut -d/ -f6 | sort) 12 | exit 1 13 | fi 14 | shift 15 | 16 | set -x 17 | cd "$extDir" 18 | phpize 19 | ./configure "$@" 20 | -------------------------------------------------------------------------------- /legacy/php/5.5/fpm/docker-php-ext-enable: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | cd "$(php -r 'echo ini_get("extension_dir");')" 5 | 6 | usage() { 7 | echo "usage: $0 module-name [module-name ...]" 8 | echo " ie: $0 gd mysqli" 9 | echo " $0 pdo pdo_mysql" 10 | echo 11 | echo 'Possible values for module-name:' 12 | echo $(find -maxdepth 1 -type f -name '*.so' -exec basename '{}' ';' | sort) 13 | } 14 | 15 | modules=() 16 | while [ $# -gt 0 ]; do 17 | module="$1" 18 | shift 19 | if [ -z "$module" ]; then 20 | continue 21 | fi 22 | if [ -f "$module.so" -a ! -f "$module" ]; then 23 | # allow ".so" to be optional 24 | module+='.so' 25 | fi 26 | if [ ! -f "$module" ]; then 27 | echo >&2 "error: $(readlink -f "$module") does not exist" 28 | echo >&2 29 | usage >&2 30 | exit 1 31 | fi 32 | modules+=( "$module" ) 33 | done 34 | 35 | if [ "${#modules[@]}" -eq 0 ]; then 36 | usage >&2 37 | exit 1 38 | fi 39 | 40 | for module in "${modules[@]}"; do 41 | if grep -q zend_extension_entry "$module"; then 42 | # https://wiki.php.net/internals/extensions#loading_zend_extensions 43 | line="zend_extension=$(readlink -f "$module")" 44 | else 45 | line="extension=$module" 46 | fi 47 | 48 | ext="$(basename "$module")" 49 | ext="${ext%.*}" 50 | if php -r 'exit(extension_loaded("'"$ext"'") ? 0 : 1);'; then 51 | # this isn't perfect, but it's better than nothing 52 | # (for example, 'opcache.so' presents inside PHP as 'Zend OPcache', not 'opcache') 53 | echo >&2 54 | echo >&2 "warning: $ext ($module) is already loaded!" 55 | echo >&2 56 | continue 57 | fi 58 | 59 | ini="/usr/local/etc/php/conf.d/docker-php-ext-$ext.ini" 60 | if ! grep -q "$line" "$ini" 2>/dev/null; then 61 | echo "$line" >> "$ini" 62 | fi 63 | done 64 | -------------------------------------------------------------------------------- /legacy/php/5.5/fpm/docker-php-ext-install: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | cd /usr/src/php/ext 5 | 6 | usage() { 7 | echo "usage: $0 [-jN] ext-name [ext-name ...]" 8 | echo " ie: $0 gd mysqli" 9 | echo " $0 pdo pdo_mysql" 10 | echo " $0 -j5 gd mbstring mysqli pdo pdo_mysql shmop" 11 | echo 12 | echo 'if custom ./configure arguments are necessary, see docker-php-ext-configure' 13 | echo 14 | echo 'Possible values for ext-name:' 15 | echo $(find /usr/src/php/ext -mindepth 2 -maxdepth 2 -type f -name 'config.m4' | cut -d/ -f6 | sort) 16 | } 17 | 18 | opts="$(getopt -o 'h?j:' --long 'help,jobs:' -- "$@" || { usage >&2 && false; })" 19 | eval set -- "$opts" 20 | 21 | j=1 22 | while true; do 23 | flag="$1" 24 | shift 25 | case "$flag" in 26 | --help|-h|'-?') usage && exit 0 ;; 27 | --jobs|-j) j="$1" && shift ;; 28 | --) break ;; 29 | *) 30 | { 31 | echo "error: unknown flag: $flag" 32 | usage 33 | } >&2 34 | exit 1 35 | ;; 36 | esac 37 | done 38 | 39 | exts=() 40 | while [ $# -gt 0 ]; do 41 | ext="$1" 42 | shift 43 | if [ -z "$ext" ]; then 44 | continue 45 | fi 46 | if [ ! -d "$ext" ]; then 47 | echo >&2 "error: $(pwd -P)/$ext does not exist" 48 | echo >&2 49 | usage >&2 50 | exit 1 51 | fi 52 | exts+=( "$ext" ) 53 | done 54 | 55 | if [ "${#exts[@]}" -eq 0 ]; then 56 | usage >&2 57 | exit 1 58 | fi 59 | 60 | for ext in "${exts[@]}"; do 61 | ( 62 | cd "$ext" 63 | [ -e Makefile ] || docker-php-ext-configure "$ext" 64 | make -j"$j" 65 | make -j"$j" install 66 | find modules -maxdepth 1 -name '*.so' -exec basename '{}' ';' | xargs --no-run-if-empty --verbose docker-php-ext-enable 67 | make -j"$j" clean 68 | ) 69 | done 70 | -------------------------------------------------------------------------------- /legacy/php/5.5/fpm/php-fpm.conf: -------------------------------------------------------------------------------- 1 | ; This file was initially adapated from the output of: (on PHP 5.6) 2 | ; grep -vE '^;|^ *$' /usr/local/etc/php-fpm.conf.default 3 | 4 | [global] 5 | 6 | error_log = /proc/self/fd/2 7 | daemonize = no 8 | 9 | [www] 10 | 11 | ; if we send this to /proc/self/fd/1, it never appears 12 | access.log = /proc/self/fd/2 13 | 14 | user = www-data 15 | group = www-data 16 | 17 | listen = [::]:9055 18 | 19 | pm = dynamic 20 | pm.max_children = 5 21 | pm.start_servers = 2 22 | pm.min_spare_servers = 1 23 | pm.max_spare_servers = 3 24 | 25 | clear_env = no 26 | 27 | ; Ensure worker stdout and stderr are sent to the main error log. 28 | catch_workers_output = yes -------------------------------------------------------------------------------- /legacy/php/5.6/apache/Dockerfile: -------------------------------------------------------------------------------- 1 | # Dockerfile written by 10up 2 | # 3 | # Work derived from official PHP Docker Library: 4 | # Copyright (c) 2014-2015 Docker, Inc. 5 | 6 | FROM debian:wheezy 7 | 8 | ENV PHP_INI_DIR /usr/local/etc/php 9 | RUN mkdir -p $PHP_INI_DIR/conf.d 10 | 11 | RUN apt-get update && apt-get install -y apache2 apache2-utils apache2-mpm-prefork apache2-prefork-dev --no-install-recommends \ 12 | && rm -rf /var/www/html \ 13 | && mkdir -p /var/lock/apache2 /var/run/apache2 /var/log/apache2 /var/www/html \ 14 | && chown -R www-data:www-data /var/lock/apache2 /var/run/apache2 /var/log/apache2 /var/www/html \ 15 | && rm -rf /var/lib/apt/lists/* 16 | 17 | RUN mv /etc/apache2/apache2.conf /etc/apache2/apache2.conf.dist 18 | COPY apache2.conf /etc/apache2/apache2.conf 19 | 20 | ENV PHP_EXTRA_BUILD_DEPS apache2-dev 21 | ENV PHP_EXTRA_CONFIGURE_ARGS --with-apxs2=/usr/bin/apxs2 22 | 23 | ENV PHP_VERSION 5.6.6 24 | 25 | ENV buildDeps=" \ 26 | bzip2 \ 27 | file \ 28 | libcurl4-openssl-dev \ 29 | libreadline6-dev \ 30 | libssl-dev \ 31 | libxml2-dev \ 32 | ca-certificates \ 33 | curl \ 34 | libxml2 \ 35 | autoconf \ 36 | gcc \ 37 | libc-dev \ 38 | make \ 39 | pkg-config \ 40 | " 41 | 42 | RUN gpg --keyserver pool.sks-keyservers.net --recv-keys 6E4F6AB321FDC07F2C332E3AC2BF0BC433CFC8B3 0BD78B5F97500D450838F95DFE857D9A90D90EC1 43 | 44 | RUN set -x \ 45 | && apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \ 46 | && curl -SL "http://php.net/get/php-$PHP_VERSION.tar.bz2/from/this/mirror" -o php.tar.bz2 \ 47 | && curl -SL "http://php.net/get/php-$PHP_VERSION.tar.bz2.asc/from/this/mirror" -o php.tar.bz2.asc \ 48 | && gpg --verify php.tar.bz2.asc \ 49 | && mkdir -p /usr/src/php \ 50 | && tar -xf php.tar.bz2 -C /usr/src/php --strip-components=1 \ 51 | && rm php.tar.bz2* \ 52 | && cd /usr/src/php \ 53 | && ./configure \ 54 | --with-config-file-path="$PHP_INI_DIR" \ 55 | --with-config-file-scan-dir="$PHP_INI_DIR/conf.d" \ 56 | $PHP_EXTRA_CONFIGURE_ARGS \ 57 | --disable-cgi \ 58 | --enable-mysqlnd \ 59 | --with-curl \ 60 | --with-openssl \ 61 | --with-readline \ 62 | --with-zlib \ 63 | && make -j"$(nproc)" \ 64 | && make install \ 65 | && { find /usr/local/bin /usr/local/sbin -type f -executable -exec strip --strip-all '{}' + || true; } \ 66 | && make clean \ 67 | && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false -o APT::AutoRemove::SuggestsImportant=false $buildDeps \ 68 | && apt-get autoremove 69 | 70 | COPY docker-php-ext-* /usr/local/bin/ 71 | 72 | ENV extensionDeps=" \ 73 | autoconf \ 74 | gcc \ 75 | make \ 76 | rsync \ 77 | libpng12-dev \ 78 | libmcrypt-dev \ 79 | libxml2-dev \ 80 | libssl-dev \ 81 | curl \ 82 | " 83 | 84 | RUN extensions=" \ 85 | gd \ 86 | mysqli \ 87 | soap \ 88 | mcrypt \ 89 | mbstring \ 90 | "; \ 91 | apt-get update && apt-get install -y --no-install-recommends $extensionDeps \ 92 | && docker-php-ext-install $extensions \ 93 | && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false -o APT::AutoRemove::SuggestsImportant=false $extensionDeps \ 94 | && apt-get autoremove 95 | 96 | ENV peclDeps=" \ 97 | curl \ 98 | libssl-dev \ 99 | libxml2-dev \ 100 | ca-certificates \ 101 | make \ 102 | autoconf \ 103 | gcc \ 104 | " 105 | 106 | RUN apt-get update && apt-get install -y --no-install-recommends $peclDeps \ 107 | && pecl install memcache && echo extension=memcache.so > $PHP_INI_DIR/conf.d/ext-memcache.ini \ 108 | && pecl install redis && echo extension=redis.so > $PHP_INI_DIR/conf.d/ext-redis.ini \ 109 | && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false -o APT::AutoRemove::SuggestsImportant=false $peclDeps \ 110 | && apt-get autoremove 111 | 112 | MAINTAINER 10up 113 | 114 | RUN apt-get update && apt-get install -y --no-install-recommends \ 115 | libxml2 \ 116 | libpng12-dev \ 117 | mcrypt \ 118 | curl \ 119 | libmcrypt4 \ 120 | less \ 121 | && rm -rf /var/lib/apt/lists/* 122 | 123 | EXPOSE 9000 -------------------------------------------------------------------------------- /legacy/php/5.6/apache/apache2.conf: -------------------------------------------------------------------------------- 1 | # see http://sources.debian.net/src/apache2/2.4.10-1/debian/config-dir/apache2.conf 2 | 3 | Mutex file:/var/lock/apache2 default 4 | PidFile /var/run/apache2/apache2.pid 5 | Timeout 300 6 | KeepAlive On 7 | MaxKeepAliveRequests 100 8 | KeepAliveTimeout 5 9 | User www-data 10 | Group www-data 11 | HostnameLookups Off 12 | ErrorLog /proc/self/fd/2 13 | LogLevel warn 14 | 15 | IncludeOptional mods-enabled/*.load 16 | IncludeOptional mods-enabled/*.conf 17 | 18 | # ports.conf 19 | Listen 80 20 | 21 | Listen 443 22 | 23 | 24 | Listen 443 25 | 26 | 27 | 28 | Options FollowSymLinks 29 | AllowOverride None 30 | Require all denied 31 | 32 | 33 | 34 | AllowOverride All 35 | Require all granted 36 | 37 | 38 | DocumentRoot /var/www/html 39 | 40 | AccessFileName .htaccess 41 | 42 | Require all denied 43 | 44 | 45 | LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined 46 | LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined 47 | LogFormat "%h %l %u %t \"%r\" %>s %O" common 48 | LogFormat "%{Referer}i -> %U" referer 49 | LogFormat "%{User-agent}i" agent 50 | 51 | CustomLog /proc/self/fd/1 combined 52 | 53 | 54 | SetHandler application/x-httpd-php 55 | 56 | 57 | # Multiple DirectoryIndex directives within the same context will add 58 | # to the list of resources to look for rather than replace 59 | # https://httpd.apache.org/docs/current/mod/mod_dir.html#directoryindex 60 | DirectoryIndex disabled 61 | DirectoryIndex index.php index.html -------------------------------------------------------------------------------- /legacy/php/5.6/apache/docker-php-ext-configure: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | ext="$1" 5 | extDir="/usr/src/php/ext/$ext" 6 | if [ -z "$ext" -o ! -d "$extDir" ]; then 7 | echo >&2 "usage: $0 ext-name [configure flags]" 8 | echo >&2 " ie: $0 gd --with-jpeg-dir=/usr/local/something" 9 | echo >&2 10 | echo >&2 'Possible values for ext-name:' 11 | echo >&2 $(find /usr/src/php/ext -mindepth 2 -maxdepth 2 -type f -name 'config.m4' | cut -d/ -f6 | sort) 12 | exit 1 13 | fi 14 | shift 15 | 16 | set -x 17 | cd "$extDir" 18 | phpize 19 | ./configure "$@" -------------------------------------------------------------------------------- /legacy/php/5.6/apache/docker-php-ext-install: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | cd /usr/src/php/ext 5 | 6 | usage() { 7 | echo "usage: $0 ext-name [ext-name ...]" 8 | echo " ie: $0 gd mysqli" 9 | echo " $0 pdo pdo_mysql" 10 | echo 11 | echo 'if custom ./configure arguments are necessary, see docker-php-ext-configure' 12 | echo 13 | echo 'Possible values for ext-name:' 14 | echo $(find /usr/src/php/ext -mindepth 2 -maxdepth 2 -type f -name 'config.m4' | cut -d/ -f6 | sort) 15 | } 16 | 17 | exts=() 18 | while [ $# -gt 0 ]; do 19 | ext="$1" 20 | shift 21 | if [ -z "$ext" ]; then 22 | continue 23 | fi 24 | if [ ! -d "$ext" ]; then 25 | echo >&2 "error: $(pwd -P)/$ext does not exist" 26 | echo >&2 27 | usage >&2 28 | exit 1 29 | fi 30 | exts+=( "$ext" ) 31 | done 32 | 33 | if [ "${#exts[@]}" -eq 0 ]; then 34 | usage >&2 35 | exit 1 36 | fi 37 | 38 | for ext in "${exts[@]}"; do 39 | ( 40 | cd "$ext" 41 | [ -e Makefile ] || docker-php-ext-configure "$ext" 42 | make 43 | make install 44 | ini="/usr/local/etc/php/conf.d/docker-php-ext-$ext.ini" 45 | for module in modules/*.so; do 46 | if [ -f "$module" ]; then 47 | if grep -q zend_extension_entry "$module"; then 48 | # https://wiki.php.net/internals/extensions#loading_zend_extensions 49 | line="zend_extension=$(basename "$module")" 50 | else 51 | line="extension=$(basename "$module")" 52 | fi 53 | if ! grep -q "$line" "$ini"; then 54 | echo "$line" >> "/usr/local/etc/php/conf.d/ext-$ext.ini" 55 | fi 56 | fi 57 | done 58 | make clean 59 | ) 60 | done -------------------------------------------------------------------------------- /legacy/php/5.6/fpm/Dockerfile: -------------------------------------------------------------------------------- 1 | # Dockerfile written by 10up 2 | # 3 | # Work derived from official PHP Docker Library: 4 | # Copyright (c) 2014-2015 Docker, Inc. 5 | 6 | FROM debian:jessie 7 | 8 | # persistent / runtime deps 9 | RUN apt-get update && apt-get install -y ca-certificates curl libssl-dev libxml2-dev libxml2 libpng12-dev libmcrypt-dev php5-memcached --no-install-recommends && rm -r /var/lib/apt/lists/* 10 | 11 | # phpize deps 12 | RUN apt-get update && apt-get install -y autoconf file g++ gcc libc-dev make pkg-config re2c --no-install-recommends && rm -r /var/lib/apt/lists/* 13 | 14 | ENV PHP_INI_DIR /usr/local/etc/php 15 | RUN mkdir -p $PHP_INI_DIR/conf.d 16 | 17 | ENV PHP_EXTRA_CONFIGURE_ARGS --enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data 18 | 19 | ENV GPG_KEYS 6E4F6AB321FDC07F2C332E3AC2BF0BC433CFC8B3 0BD78B5F97500D450838F95DFE857D9A90D90EC1 20 | RUN set -xe \ 21 | && for key in $GPG_KEYS; do \ 22 | gpg --keyserver pool.sks-keyservers.net --recv-keys "$key"; \ 23 | done 24 | 25 | ENV PHP_VERSION 5.6.20 26 | ENV PHP_FILENAME php-5.6.20.tar.xz 27 | 28 | RUN buildDeps=" \ 29 | bzip2 \ 30 | xz-utils \ 31 | libreadline6-dev \ 32 | libcurl4-openssl-dev \ 33 | " \ 34 | && set -x \ 35 | && apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \ 36 | && curl -SL "http://php.net/get/php-$PHP_VERSION.tar.bz2/from/this/mirror" -o "$PHP_FILENAME" \ 37 | && curl -SL "http://php.net/get/php-$PHP_VERSION.tar.bz2.asc/from/this/mirror" -o "$PHP_FILENAME.asc" \ 38 | && gpg --verify "$PHP_FILENAME.asc" \ 39 | && mkdir -p /usr/src/php \ 40 | && tar -xf "$PHP_FILENAME" -C /usr/src/php --strip-components=1 \ 41 | && rm "$PHP_FILENAME"* \ 42 | && cd /usr/src/php \ 43 | && ./configure \ 44 | --with-config-file-path="$PHP_INI_DIR" \ 45 | --with-config-file-scan-dir="$PHP_INI_DIR/conf.d" \ 46 | $PHP_EXTRA_CONFIGURE_ARGS \ 47 | --disable-cgi \ 48 | --enable-mysqlnd \ 49 | --with-curl \ 50 | --with-openssl \ 51 | --with-readline \ 52 | --with-zlib \ 53 | && make -j"$(nproc)" \ 54 | && make install \ 55 | && { find /usr/local/bin /usr/local/sbin -type f -executable -exec strip --strip-all '{}' + || true; } \ 56 | && make clean \ 57 | && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false -o APT::AutoRemove::SuggestsImportant=false $buildDeps \ 58 | && apt-get autoremove 59 | 60 | COPY docker-php-ext-* /usr/local/bin/ 61 | 62 | ENV extensionDeps=" \ 63 | rsync \ 64 | " 65 | 66 | RUN extensions=" \ 67 | gd \ 68 | mysqli \ 69 | soap \ 70 | mcrypt \ 71 | mbstring \ 72 | "; \ 73 | apt-get update && apt-get install -y --no-install-recommends $extensionDeps \ 74 | && docker-php-ext-install $extensions \ 75 | && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false -o APT::AutoRemove::SuggestsImportant=false $extensionDeps \ 76 | && apt-get autoremove 77 | 78 | ENV peclDeps=" \ 79 | libmemcached-dev \ 80 | " 81 | RUN apt-get update && apt-get install -y --no-install-recommends $peclDeps \ 82 | && pecl install redis && echo extension=redis.so > $PHP_INI_DIR/conf.d/ext-redis.ini \ 83 | && pecl install memcached && echo extension=memcached.so > $PHP_INI_DIR/conf.d/ext-memcached.ini \ 84 | && pecl install memcache && echo extension=memcache.so > $PHP_INI_DIR/conf.d/ext-memcache.ini \ 85 | # && pecl install apcu && echo extension=apcu.so > $PHP_INI_DIR/conf.d/ext-apcu.ini \ 86 | && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false -o APT::AutoRemove::SuggestsImportant=false $peclDeps \ 87 | && apt-get autoremove 88 | 89 | MAINTAINER 10up 90 | 91 | WORKDIR /var/www/html 92 | COPY php-fpm.conf /usr/local/etc/ 93 | 94 | EXPOSE 9056 95 | CMD ["php-fpm"] -------------------------------------------------------------------------------- /legacy/php/5.6/fpm/docker-php-ext-configure: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | ext="$1" 5 | extDir="/usr/src/php/ext/$ext" 6 | if [ -z "$ext" -o ! -d "$extDir" ]; then 7 | echo >&2 "usage: $0 ext-name [configure flags]" 8 | echo >&2 " ie: $0 gd --with-jpeg-dir=/usr/local/something" 9 | echo >&2 10 | echo >&2 'Possible values for ext-name:' 11 | echo >&2 $(find /usr/src/php/ext -mindepth 2 -maxdepth 2 -type f -name 'config.m4' | cut -d/ -f6 | sort) 12 | exit 1 13 | fi 14 | shift 15 | 16 | set -x 17 | cd "$extDir" 18 | phpize 19 | ./configure "$@" -------------------------------------------------------------------------------- /legacy/php/5.6/fpm/docker-php-ext-enable: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | cd "$(php -r 'echo ini_get("extension_dir");')" 5 | 6 | usage() { 7 | echo "usage: $0 module-name [module-name ...]" 8 | echo " ie: $0 gd mysqli" 9 | echo " $0 pdo pdo_mysql" 10 | echo 11 | echo 'Possible values for module-name:' 12 | echo $(find -maxdepth 1 -type f -name '*.so' -exec basename '{}' ';' | sort) 13 | } 14 | 15 | modules=() 16 | while [ $# -gt 0 ]; do 17 | module="$1" 18 | shift 19 | if [ -z "$module" ]; then 20 | continue 21 | fi 22 | if [ -f "$module.so" -a ! -f "$module" ]; then 23 | # allow ".so" to be optional 24 | module+='.so' 25 | fi 26 | if [ ! -f "$module" ]; then 27 | echo >&2 "error: $(readlink -f "$module") does not exist" 28 | echo >&2 29 | usage >&2 30 | exit 1 31 | fi 32 | modules+=( "$module" ) 33 | done 34 | 35 | if [ "${#modules[@]}" -eq 0 ]; then 36 | usage >&2 37 | exit 1 38 | fi 39 | 40 | for module in "${modules[@]}"; do 41 | if grep -q zend_extension_entry "$module"; then 42 | # https://wiki.php.net/internals/extensions#loading_zend_extensions 43 | line="zend_extension=$(readlink -f "$module")" 44 | else 45 | line="extension=$module" 46 | fi 47 | 48 | ext="$(basename "$module")" 49 | ext="${ext%.*}" 50 | if php -r 'exit(extension_loaded("'"$ext"'") ? 0 : 1);'; then 51 | # this isn't perfect, but it's better than nothing 52 | # (for example, 'opcache.so' presents inside PHP as 'Zend OPcache', not 'opcache') 53 | echo >&2 54 | echo >&2 "warning: $ext ($module) is already loaded!" 55 | echo >&2 56 | continue 57 | fi 58 | 59 | ini="/usr/local/etc/php/conf.d/docker-php-ext-$ext.ini" 60 | if ! grep -q "$line" "$ini" 2>/dev/null; then 61 | echo "$line" >> "$ini" 62 | fi 63 | done 64 | -------------------------------------------------------------------------------- /legacy/php/5.6/fpm/docker-php-ext-install: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | cd /usr/src/php/ext 5 | 6 | usage() { 7 | echo "usage: $0 ext-name [ext-name ...]" 8 | echo " ie: $0 gd mysqli" 9 | echo " $0 pdo pdo_mysql" 10 | echo 11 | echo 'if custom ./configure arguments are necessary, see docker-php-ext-configure' 12 | echo 13 | echo 'Possible values for ext-name:' 14 | echo $(find /usr/src/php/ext -mindepth 2 -maxdepth 2 -type f -name 'config.m4' | cut -d/ -f6 | sort) 15 | } 16 | 17 | exts=() 18 | while [ $# -gt 0 ]; do 19 | ext="$1" 20 | shift 21 | if [ -z "$ext" ]; then 22 | continue 23 | fi 24 | if [ ! -d "$ext" ]; then 25 | echo >&2 "error: $(pwd -P)/$ext does not exist" 26 | echo >&2 27 | usage >&2 28 | exit 1 29 | fi 30 | exts+=( "$ext" ) 31 | done 32 | 33 | if [ "${#exts[@]}" -eq 0 ]; then 34 | usage >&2 35 | exit 1 36 | fi 37 | 38 | for ext in "${exts[@]}"; do 39 | ( 40 | cd "$ext" 41 | [ -e Makefile ] || docker-php-ext-configure "$ext" 42 | make 43 | make install 44 | ini="/usr/local/etc/php/conf.d/docker-php-ext-$ext.ini" 45 | for module in modules/*.so; do 46 | if [ -f "$module" ]; then 47 | if grep -q zend_extension_entry "$module"; then 48 | # https://wiki.php.net/internals/extensions#loading_zend_extensions 49 | line="zend_extension=$(basename "$module")" 50 | else 51 | line="extension=$(basename "$module")" 52 | fi 53 | if ! grep -q "$line" "$ini"; then 54 | echo "$line" >> "/usr/local/etc/php/conf.d/ext-$ext.ini" 55 | fi 56 | fi 57 | done 58 | make clean 59 | ) 60 | done -------------------------------------------------------------------------------- /legacy/php/5.6/fpm/php-fpm.conf: -------------------------------------------------------------------------------- 1 | ; This file was initially adapated from the output of: (on PHP 5.6) 2 | ; grep -vE '^;|^ *$' /usr/local/etc/php-fpm.conf.default 3 | 4 | [global] 5 | 6 | error_log = /proc/self/fd/2 7 | daemonize = no 8 | 9 | [www] 10 | 11 | ; if we send this to /proc/self/fd/1, it never appears 12 | access.log = /proc/self/fd/2 13 | 14 | user = www-data 15 | group = www-data 16 | 17 | listen = [::]:9056 18 | 19 | pm = dynamic 20 | pm.max_children = 5 21 | pm.start_servers = 2 22 | pm.min_spare_servers = 1 23 | pm.max_spare_servers = 3 -------------------------------------------------------------------------------- /legacy/php/7.0/apache/Dockerfile: -------------------------------------------------------------------------------- 1 | # Dockerfile written by 10up 2 | # 3 | # Work derived from official PHP Docker Library: 4 | # Copyright (c) 2014-2015 Docker, Inc. 5 | 6 | FROM debian:jessie 7 | 8 | # persistent / runtime deps 9 | RUN apt-get update && apt-get install -y ca-certificates curl librecode0 libsqlite3-0 libxml2 --no-install-recommends && rm -r /var/lib/apt/lists/* 10 | 11 | # phpize deps 12 | RUN apt-get update && apt-get install -y autoconf file g++ gcc libc-dev make pkg-config re2c --no-install-recommends && rm -r /var/lib/apt/lists/* 13 | 14 | ENV PHP_INI_DIR /usr/local/etc/php 15 | RUN mkdir -p $PHP_INI_DIR/conf.d 16 | 17 | RUN apt-get update && apt-get install -y apache2-bin apache2.2-common --no-install-recommends && rm -rf /var/lib/apt/lists/* 18 | 19 | RUN rm -rf /var/www/html && mkdir -p /var/lock/apache2 /var/run/apache2 /var/log/apache2 /var/www/html && chown -R www-data:www-data /var/lock/apache2 /var/run/apache2 /var/log/apache2 /var/www/html 20 | 21 | # Apache + PHP requires preforking Apache for best results 22 | RUN a2dismod mpm_event && a2enmod mpm_prefork 23 | 24 | RUN mv /etc/apache2/apache2.conf /etc/apache2/apache2.conf.dist && rm /etc/apache2/conf-enabled/* /etc/apache2/sites-enabled/* 25 | COPY apache2.conf /etc/apache2/apache2.conf 26 | # it'd be nice if we could not COPY apache2.conf until the end of the Dockerfile, but its contents are checked by PHP during compilation 27 | 28 | ENV PHP_EXTRA_BUILD_DEPS apache2-dev 29 | ENV PHP_EXTRA_CONFIGURE_ARGS --with-apxs2 30 | 31 | ENV GPG_KEYS 1A4E8B7277C42E53DBA9C7B9BCAA30EA9C0D5763 32 | RUN set -xe \ 33 | && for key in $GPG_KEYS; do \ 34 | gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ 35 | done 36 | 37 | ENV PHP_VERSION 7.0.0 38 | ENV PHP_FILENAME php-7.0.0.tar.xz 39 | ENV PHP_SHA256 7dbdda74c502960febe0544b3e3a7c430389a7a4260e94c73fd8ca26c33b8540 40 | 41 | # --enable-mysqlnd is included below because it's harder to compile after the fact the extensions are (since it's a plugin for several extensions, not an extension in itself) 42 | RUN buildDeps=" \ 43 | $PHP_EXTRA_BUILD_DEPS \ 44 | libcurl4-openssl-dev \ 45 | libreadline6-dev \ 46 | librecode-dev \ 47 | libsqlite3-dev \ 48 | libssl-dev \ 49 | libxml2-dev \ 50 | xz-utils \ 51 | " \ 52 | && set -x \ 53 | && apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \ 54 | && curl -fSL "http://php.net/get/$PHP_FILENAME/from/this/mirror" -o "$PHP_FILENAME" \ 55 | && echo "$PHP_SHA256 *$PHP_FILENAME" | sha256sum -c - \ 56 | && curl -fSL "http://php.net/get/$PHP_FILENAME.asc/from/this/mirror" -o "$PHP_FILENAME.asc" \ 57 | && gpg --verify "$PHP_FILENAME.asc" \ 58 | && mkdir -p /usr/src/php \ 59 | && tar -xf "$PHP_FILENAME" -C /usr/src/php --strip-components=1 \ 60 | && rm "$PHP_FILENAME"* \ 61 | && cd /usr/src/php \ 62 | && ./configure \ 63 | --with-config-file-path="$PHP_INI_DIR" \ 64 | --with-config-file-scan-dir="$PHP_INI_DIR/conf.d" \ 65 | $PHP_EXTRA_CONFIGURE_ARGS \ 66 | --disable-cgi \ 67 | --enable-mysqlnd \ 68 | --with-curl \ 69 | --with-openssl \ 70 | --with-readline \ 71 | --with-recode \ 72 | --with-zlib \ 73 | && make -j"$(nproc)" \ 74 | && make install \ 75 | && { find /usr/local/bin /usr/local/sbin -type f -executable -exec strip --strip-all '{}' + || true; } \ 76 | && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false -o APT::AutoRemove::SuggestsImportant=false $buildDeps \ 77 | && make clean 78 | 79 | COPY docker-php-ext-* /usr/local/bin/ 80 | 81 | MAINTAINER 10up 82 | 83 | COPY apache2-foreground /usr/local/bin/ 84 | WORKDIR /var/www/html 85 | 86 | EXPOSE 80 87 | CMD ["apache2-foreground"] 88 | -------------------------------------------------------------------------------- /legacy/php/7.0/apache/apache2-foreground: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | # Apache gets grumpy about PID files pre-existing 5 | rm -f /var/run/apache2/apache2.pid 6 | 7 | exec apache2 -DFOREGROUND 8 | -------------------------------------------------------------------------------- /legacy/php/7.0/apache/apache2.conf: -------------------------------------------------------------------------------- 1 | # see http://sources.debian.net/src/apache2/2.4.10-1/debian/config-dir/apache2.conf 2 | 3 | Mutex file:/var/lock/apache2 default 4 | PidFile /var/run/apache2/apache2.pid 5 | Timeout 300 6 | KeepAlive On 7 | MaxKeepAliveRequests 100 8 | KeepAliveTimeout 5 9 | User www-data 10 | Group www-data 11 | HostnameLookups Off 12 | ErrorLog /proc/self/fd/2 13 | LogLevel warn 14 | 15 | IncludeOptional mods-enabled/*.load 16 | IncludeOptional mods-enabled/*.conf 17 | 18 | # ports.conf 19 | Listen 80 20 | 21 | Listen 443 22 | 23 | 24 | Listen 443 25 | 26 | 27 | 28 | Options FollowSymLinks 29 | AllowOverride None 30 | Require all denied 31 | 32 | 33 | 34 | AllowOverride All 35 | Require all granted 36 | 37 | 38 | DocumentRoot /var/www/html 39 | 40 | AccessFileName .htaccess 41 | 42 | Require all denied 43 | 44 | 45 | LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined 46 | LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined 47 | LogFormat "%h %l %u %t \"%r\" %>s %O" common 48 | LogFormat "%{Referer}i -> %U" referer 49 | LogFormat "%{User-agent}i" agent 50 | 51 | CustomLog /proc/self/fd/1 combined 52 | 53 | 54 | SetHandler application/x-httpd-php 55 | 56 | 57 | # Multiple DirectoryIndex directives within the same context will add 58 | # to the list of resources to look for rather than replace 59 | # https://httpd.apache.org/docs/current/mod/mod_dir.html#directoryindex 60 | DirectoryIndex disabled 61 | DirectoryIndex index.php index.html 62 | 63 | IncludeOptional conf-enabled/*.conf 64 | IncludeOptional sites-enabled/*.conf 65 | -------------------------------------------------------------------------------- /legacy/php/7.0/apache/docker-php-ext-configure: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | ext="$1" 5 | extDir="/usr/src/php/ext/$ext" 6 | if [ -z "$ext" -o ! -d "$extDir" ]; then 7 | echo >&2 "usage: $0 ext-name [configure flags]" 8 | echo >&2 " ie: $0 gd --with-jpeg-dir=/usr/local/something" 9 | echo >&2 10 | echo >&2 'Possible values for ext-name:' 11 | echo >&2 $(find /usr/src/php/ext -mindepth 2 -maxdepth 2 -type f -name 'config.m4' | cut -d/ -f6 | sort) 12 | exit 1 13 | fi 14 | shift 15 | 16 | set -x 17 | cd "$extDir" 18 | phpize 19 | ./configure "$@" 20 | -------------------------------------------------------------------------------- /legacy/php/7.0/apache/docker-php-ext-enable: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | cd "$(php -r 'echo ini_get("extension_dir");')" 5 | 6 | usage() { 7 | echo "usage: $0 module-name [module-name ...]" 8 | echo " ie: $0 gd mysqli" 9 | echo " $0 pdo pdo_mysql" 10 | echo 11 | echo 'Possible values for module-name:' 12 | echo $(find -maxdepth 1 -type f -name '*.so' -exec basename '{}' ';' | sort) 13 | } 14 | 15 | modules=() 16 | while [ $# -gt 0 ]; do 17 | module="$1" 18 | shift 19 | if [ -z "$module" ]; then 20 | continue 21 | fi 22 | if [ -f "$module.so" -a ! -f "$module" ]; then 23 | # allow ".so" to be optional 24 | module+='.so' 25 | fi 26 | if [ ! -f "$module" ]; then 27 | echo >&2 "error: $(readlink -f "$module") does not exist" 28 | echo >&2 29 | usage >&2 30 | exit 1 31 | fi 32 | modules+=( "$module" ) 33 | done 34 | 35 | if [ "${#modules[@]}" -eq 0 ]; then 36 | usage >&2 37 | exit 1 38 | fi 39 | 40 | for module in "${modules[@]}"; do 41 | if grep -q zend_extension_entry "$module"; then 42 | # https://wiki.php.net/internals/extensions#loading_zend_extensions 43 | line="zend_extension=$(readlink -f "$module")" 44 | else 45 | line="extension=$module" 46 | fi 47 | 48 | ext="$(basename "$module")" 49 | ext="${ext%.*}" 50 | if php -r 'exit(extension_loaded("'"$ext"'") ? 0 : 1);'; then 51 | # this isn't perfect, but it's better than nothing 52 | # (for example, 'opcache.so' presents inside PHP as 'Zend OPcache', not 'opcache') 53 | echo >&2 54 | echo >&2 "warning: $ext ($module) is already loaded!" 55 | echo >&2 56 | continue 57 | fi 58 | 59 | ini="/usr/local/etc/php/conf.d/docker-php-ext-$ext.ini" 60 | if ! grep -q "$line" "$ini" 2>/dev/null; then 61 | echo "$line" >> "$ini" 62 | fi 63 | done 64 | -------------------------------------------------------------------------------- /legacy/php/7.0/apache/docker-php-ext-install: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | cd /usr/src/php/ext 5 | 6 | usage() { 7 | echo "usage: $0 [-jN] ext-name [ext-name ...]" 8 | echo " ie: $0 gd mysqli" 9 | echo " $0 pdo pdo_mysql" 10 | echo " $0 -j5 gd mbstring mysqli pdo pdo_mysql shmop" 11 | echo 12 | echo 'if custom ./configure arguments are necessary, see docker-php-ext-configure' 13 | echo 14 | echo 'Possible values for ext-name:' 15 | echo $(find /usr/src/php/ext -mindepth 2 -maxdepth 2 -type f -name 'config.m4' | cut -d/ -f6 | sort) 16 | } 17 | 18 | opts="$(getopt -o 'h?j:' --long 'help,jobs:' -- "$@" || { usage >&2 && false; })" 19 | eval set -- "$opts" 20 | 21 | j=1 22 | while true; do 23 | flag="$1" 24 | shift 25 | case "$flag" in 26 | --help|-h|'-?') usage && exit 0 ;; 27 | --jobs|-j) j="$1" && shift ;; 28 | --) break ;; 29 | *) 30 | { 31 | echo "error: unknown flag: $flag" 32 | usage 33 | } >&2 34 | exit 1 35 | ;; 36 | esac 37 | done 38 | 39 | exts=() 40 | while [ $# -gt 0 ]; do 41 | ext="$1" 42 | shift 43 | if [ -z "$ext" ]; then 44 | continue 45 | fi 46 | if [ ! -d "$ext" ]; then 47 | echo >&2 "error: $(pwd -P)/$ext does not exist" 48 | echo >&2 49 | usage >&2 50 | exit 1 51 | fi 52 | exts+=( "$ext" ) 53 | done 54 | 55 | if [ "${#exts[@]}" -eq 0 ]; then 56 | usage >&2 57 | exit 1 58 | fi 59 | 60 | for ext in "${exts[@]}"; do 61 | ( 62 | cd "$ext" 63 | [ -e Makefile ] || docker-php-ext-configure "$ext" 64 | make -j"$j" 65 | make -j"$j" install 66 | find modules -maxdepth 1 -name '*.so' -exec basename '{}' ';' | xargs --no-run-if-empty --verbose docker-php-ext-enable 67 | make -j"$j" clean 68 | ) 69 | done 70 | -------------------------------------------------------------------------------- /legacy/php/7.0/fpm/Dockerfile: -------------------------------------------------------------------------------- 1 | # Dockerfile written by 10up 2 | # 3 | # Work derived from official PHP Docker Library: 4 | # Copyright (c) 2014-2015 Docker, Inc. 5 | 6 | FROM debian:jessie 7 | 8 | # persistent / runtime deps 9 | RUN apt-get update && apt-get install -y ca-certificates curl libssl-dev libxml2-dev libxml2 libpng12-dev libmcrypt-dev php5-memcached --no-install-recommends && rm -r /var/lib/apt/lists/* 10 | 11 | # phpize deps 12 | RUN apt-get update && apt-get install -y autoconf file g++ gcc libc-dev make pkg-config re2c --no-install-recommends && rm -r /var/lib/apt/lists/* 13 | 14 | ENV PHP_INI_DIR /usr/local/etc/php 15 | RUN mkdir -p $PHP_INI_DIR/conf.d 16 | 17 | ENV PHP_EXTRA_CONFIGURE_ARGS --enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data 18 | 19 | ENV GPG_KEYS 6E4F6AB321FDC07F2C332E3AC2BF0BC433CFC8B3 1A4E8B7277C42E53DBA9C7B9BCAA30EA9C0D5763 20 | RUN set -xe \ 21 | && for key in $GPG_KEYS; do \ 22 | gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ 23 | done 24 | 25 | ENV PHP_VERSION 7.0.5 26 | ENV PHP_FILENAME php-7.0.5.tar.xz 27 | 28 | # --enable-mysqlnd is included below because it's harder to compile after the fact the extensions are (since it's a plugin for several extensions, not an extension in itself) 29 | RUN buildDeps=" \ 30 | $PHP_EXTRA_BUILD_DEPS \ 31 | libcurl4-openssl-dev \ 32 | libreadline6-dev \ 33 | xz-utils \ 34 | " \ 35 | && set -x \ 36 | && apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \ 37 | && curl -fSL "http://php.net/get/$PHP_FILENAME/from/this/mirror" -o "$PHP_FILENAME" \ 38 | && curl -fSL "http://php.net/get/$PHP_FILENAME.asc/from/this/mirror" -o "$PHP_FILENAME.asc" \ 39 | && gpg --verify "$PHP_FILENAME.asc" \ 40 | && mkdir -p /usr/src/php \ 41 | && tar -xf "$PHP_FILENAME" -C /usr/src/php --strip-components=1 \ 42 | && rm "$PHP_FILENAME"* \ 43 | && cd /usr/src/php \ 44 | && ./configure \ 45 | --with-config-file-path="$PHP_INI_DIR" \ 46 | --with-config-file-scan-dir="$PHP_INI_DIR/conf.d" \ 47 | $PHP_EXTRA_CONFIGURE_ARGS \ 48 | --disable-cgi \ 49 | --enable-mysqlnd \ 50 | --with-curl \ 51 | --with-openssl \ 52 | --with-readline \ 53 | --with-zlib \ 54 | && make -j"$(nproc)" \ 55 | && make install \ 56 | && { find /usr/local/bin /usr/local/sbin -type f -executable -exec strip --strip-all '{}' + || true; } \ 57 | && make clean \ 58 | && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false -o APT::AutoRemove::SuggestsImportant=false $buildDeps \ 59 | && apt-get autoremove 60 | 61 | COPY docker-php-ext-* /usr/local/bin/ 62 | 63 | ENV extensionDeps=" \ 64 | rsync \ 65 | " 66 | 67 | RUN extensions=" \ 68 | gd \ 69 | mysqli \ 70 | soap \ 71 | mcrypt \ 72 | mbstring \ 73 | "; \ 74 | apt-get update && apt-get install -y --no-install-recommends $extensionDeps \ 75 | && docker-php-ext-install $extensions \ 76 | && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false -o APT::AutoRemove::SuggestsImportant=false $extensionDeps \ 77 | && apt-get autoremove 78 | 79 | ENV peclDeps=" \ 80 | libmemcached-dev \ 81 | " 82 | RUN apt-get update && apt-get install -y --no-install-recommends $peclDeps \ 83 | # && pecl install redis && echo extension=redis.so > $PHP_INI_DIR/conf.d/ext-redis.ini \ 84 | # && pecl install memcached && echo extension=memcached.so > $PHP_INI_DIR/conf.d/ext-memcached.ini \ 85 | # && pecl install memcache && echo extension=memcache.so > $PHP_INI_DIR/conf.d/ext-memcache.ini \ 86 | && pecl install apcu && echo extension=apcu.so > $PHP_INI_DIR/conf.d/ext-apcu.ini \ 87 | && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false -o APT::AutoRemove::SuggestsImportant=false $peclDeps \ 88 | && apt-get autoremove 89 | 90 | ENV memcachedDeps=" \ 91 | git \ 92 | libmemcached-dev \ 93 | " 94 | 95 | RUN apt-get update && apt-get install -y --no-install-recommends $memcachedDeps \ 96 | && git clone https://github.com/php-memcached-dev/php-memcached.git && cd php-memcached \ 97 | && git checkout php7 \ 98 | && phpize \ 99 | && ./configure --disable-memcached-sasl \ 100 | && make && make install \ 101 | && echo extension=memcached.so > $PHP_INI_DIR/conf.d/ext-memcached.ini \ 102 | && curl -fSL "https://github.com/websupport-sk/pecl-memcache/archive/fdbd46bbc6f53ed6e024521895e142cbfc9b3340/memcache-3.0.9-fdbd46b.tar.gz" -o "memcache.tar.gz" \ 103 | && mkdir -p /usr/src/php-memcache \ 104 | && tar -xf "memcache.tar.gz" -C /usr/src/php-memcache --strip-components=1 \ 105 | && cd /usr/src/php-memcache && phpize \ 106 | && ./configure \ 107 | && make && make install \ 108 | && echo extension=memcache.so > $PHP_INI_DIR/conf.d/ext-memcache.ini \ 109 | && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false -o APT::AutoRemove::SuggestsImportant=false $memcachedDeps \ 110 | && apt-get autoremove 111 | 112 | MAINTAINER 10up 113 | 114 | WORKDIR /var/www/html 115 | COPY php-fpm.conf /usr/local/etc/ 116 | 117 | EXPOSE 9070 118 | CMD ["php-fpm"] 119 | -------------------------------------------------------------------------------- /legacy/php/7.0/fpm/docker-php-ext-configure: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | ext="$1" 5 | extDir="/usr/src/php/ext/$ext" 6 | if [ -z "$ext" -o ! -d "$extDir" ]; then 7 | echo >&2 "usage: $0 ext-name [configure flags]" 8 | echo >&2 " ie: $0 gd --with-jpeg-dir=/usr/local/something" 9 | echo >&2 10 | echo >&2 'Possible values for ext-name:' 11 | echo >&2 $(find /usr/src/php/ext -mindepth 2 -maxdepth 2 -type f -name 'config.m4' | cut -d/ -f6 | sort) 12 | exit 1 13 | fi 14 | shift 15 | 16 | set -x 17 | cd "$extDir" 18 | phpize 19 | ./configure "$@" 20 | -------------------------------------------------------------------------------- /legacy/php/7.0/fpm/docker-php-ext-enable: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | cd "$(php -r 'echo ini_get("extension_dir");')" 5 | 6 | usage() { 7 | echo "usage: $0 module-name [module-name ...]" 8 | echo " ie: $0 gd mysqli" 9 | echo " $0 pdo pdo_mysql" 10 | echo 11 | echo 'Possible values for module-name:' 12 | echo $(find -maxdepth 1 -type f -name '*.so' -exec basename '{}' ';' | sort) 13 | } 14 | 15 | modules=() 16 | while [ $# -gt 0 ]; do 17 | module="$1" 18 | shift 19 | if [ -z "$module" ]; then 20 | continue 21 | fi 22 | if [ -f "$module.so" -a ! -f "$module" ]; then 23 | # allow ".so" to be optional 24 | module+='.so' 25 | fi 26 | if [ ! -f "$module" ]; then 27 | echo >&2 "error: $(readlink -f "$module") does not exist" 28 | echo >&2 29 | usage >&2 30 | exit 1 31 | fi 32 | modules+=( "$module" ) 33 | done 34 | 35 | if [ "${#modules[@]}" -eq 0 ]; then 36 | usage >&2 37 | exit 1 38 | fi 39 | 40 | for module in "${modules[@]}"; do 41 | if grep -q zend_extension_entry "$module"; then 42 | # https://wiki.php.net/internals/extensions#loading_zend_extensions 43 | line="zend_extension=$(readlink -f "$module")" 44 | else 45 | line="extension=$module" 46 | fi 47 | 48 | ext="$(basename "$module")" 49 | ext="${ext%.*}" 50 | if php -r 'exit(extension_loaded("'"$ext"'") ? 0 : 1);'; then 51 | # this isn't perfect, but it's better than nothing 52 | # (for example, 'opcache.so' presents inside PHP as 'Zend OPcache', not 'opcache') 53 | echo >&2 54 | echo >&2 "warning: $ext ($module) is already loaded!" 55 | echo >&2 56 | continue 57 | fi 58 | 59 | ini="/usr/local/etc/php/conf.d/docker-php-ext-$ext.ini" 60 | if ! grep -q "$line" "$ini" 2>/dev/null; then 61 | echo "$line" >> "$ini" 62 | fi 63 | done 64 | -------------------------------------------------------------------------------- /legacy/php/7.0/fpm/docker-php-ext-install: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | cd /usr/src/php/ext 5 | 6 | usage() { 7 | echo "usage: $0 [-jN] ext-name [ext-name ...]" 8 | echo " ie: $0 gd mysqli" 9 | echo " $0 pdo pdo_mysql" 10 | echo " $0 -j5 gd mbstring mysqli pdo pdo_mysql shmop" 11 | echo 12 | echo 'if custom ./configure arguments are necessary, see docker-php-ext-configure' 13 | echo 14 | echo 'Possible values for ext-name:' 15 | echo $(find /usr/src/php/ext -mindepth 2 -maxdepth 2 -type f -name 'config.m4' | cut -d/ -f6 | sort) 16 | } 17 | 18 | opts="$(getopt -o 'h?j:' --long 'help,jobs:' -- "$@" || { usage >&2 && false; })" 19 | eval set -- "$opts" 20 | 21 | j=1 22 | while true; do 23 | flag="$1" 24 | shift 25 | case "$flag" in 26 | --help|-h|'-?') usage && exit 0 ;; 27 | --jobs|-j) j="$1" && shift ;; 28 | --) break ;; 29 | *) 30 | { 31 | echo "error: unknown flag: $flag" 32 | usage 33 | } >&2 34 | exit 1 35 | ;; 36 | esac 37 | done 38 | 39 | exts=() 40 | while [ $# -gt 0 ]; do 41 | ext="$1" 42 | shift 43 | if [ -z "$ext" ]; then 44 | continue 45 | fi 46 | if [ ! -d "$ext" ]; then 47 | echo >&2 "error: $(pwd -P)/$ext does not exist" 48 | echo >&2 49 | usage >&2 50 | exit 1 51 | fi 52 | exts+=( "$ext" ) 53 | done 54 | 55 | if [ "${#exts[@]}" -eq 0 ]; then 56 | usage >&2 57 | exit 1 58 | fi 59 | 60 | for ext in "${exts[@]}"; do 61 | ( 62 | cd "$ext" 63 | [ -e Makefile ] || docker-php-ext-configure "$ext" 64 | make -j"$j" 65 | make -j"$j" install 66 | find modules -maxdepth 1 -name '*.so' -exec basename '{}' ';' | xargs --no-run-if-empty --verbose docker-php-ext-enable 67 | make -j"$j" clean 68 | ) 69 | done 70 | -------------------------------------------------------------------------------- /legacy/php/7.0/fpm/php-fpm.conf: -------------------------------------------------------------------------------- 1 | ; This file was initially adapated from the output of: (on PHP 5.6) 2 | ; grep -vE '^;|^ *$' /usr/local/etc/php-fpm.conf.default 3 | 4 | [global] 5 | 6 | error_log = /proc/self/fd/2 7 | daemonize = no 8 | 9 | [www] 10 | 11 | ; if we send this to /proc/self/fd/1, it never appears 12 | access.log = /proc/self/fd/2 13 | 14 | user = www-data 15 | group = www-data 16 | 17 | listen = [::]:9070 18 | 19 | pm = dynamic 20 | pm.max_children = 5 21 | pm.start_servers = 2 22 | pm.min_spare_servers = 1 23 | pm.max_spare_servers = 3 24 | 25 | clear_env = no 26 | 27 | ; Ensure worker stdout and stderr are sent to the main error log. 28 | catch_workers_output = yes --------------------------------------------------------------------------------