├── .gitignore ├── 5.3 ├── Dockerfile ├── config │ ├── apache_default │ └── bashrc └── core │ ├── docker-entrypoint.sh │ ├── memcached.conf │ ├── php-smtp.ini │ └── ssmtp.conf ├── 5.4 ├── Dockerfile ├── config │ ├── apache2.conf │ ├── bashrc │ └── php.ini ├── core │ ├── docker-entrypoint.sh │ ├── memcached.conf │ ├── php-smtp.ini │ └── ssmtp.conf ├── docker-php-ext-install └── docker-php-pecl-install ├── 5.5 ├── Dockerfile ├── config │ ├── apache2.conf │ ├── bashrc │ └── php.ini ├── core │ ├── docker-entrypoint.sh │ ├── memcached.conf │ ├── php-smtp.ini │ └── ssmtp.conf ├── docker-php-ext-install └── docker-php-pecl-install ├── 5.6-bcmath └── Dockerfile ├── 5.6-ldap ├── Dockerfile ├── config │ ├── apache2.conf │ ├── bashrc │ └── php.ini ├── core │ ├── docker-entrypoint.sh │ ├── envvars │ ├── memcached.conf │ ├── other-vhosts-access-log.conf │ ├── php-smtp.ini │ └── ssmtp.conf ├── docker-php-ext-install └── docker-php-pecl-install ├── 5.6-smtp ├── Dockerfile ├── config │ ├── apache2.conf │ ├── bashrc │ └── php.ini ├── core │ ├── docker-entrypoint.sh │ ├── envvars │ ├── memcached.conf │ ├── msmtprc.conf │ ├── other-vhosts-access-log.conf │ ├── php-smtp.ini │ └── ssmtp.conf ├── docker-php-ext-install └── docker-php-pecl-install ├── 5.6 ├── Dockerfile ├── config │ ├── apache2.conf │ ├── bashrc │ └── php.ini ├── core │ ├── docker-entrypoint.sh │ ├── envvars │ ├── memcached.conf │ ├── other-vhosts-access-log.conf │ ├── php-smtp.ini │ └── ssmtp.conf ├── docker-php-ext-install └── docker-php-pecl-install ├── 7.0-dev ├── Dockerfile ├── config │ ├── apache2.conf │ └── php.ini ├── core │ ├── docker-entrypoint.sh │ ├── envvars │ ├── memcached.conf │ ├── other-vhosts-access-log.conf │ ├── php-smtp.ini │ └── ssmtp.conf ├── docker-php-ext-install └── docker-php-pecl-install ├── 7.0-wkhtmltopdf ├── Dockerfile ├── README.md └── core │ └── docker-entrypoint.sh ├── 7.0 ├── Dockerfile ├── config │ ├── apache2.conf │ ├── bashrc │ └── php.ini ├── core │ ├── docker-entrypoint.sh │ ├── envvars │ ├── memcached.conf │ ├── other-vhosts-access-log.conf │ ├── php-smtp.ini │ └── ssmtp.conf ├── docker-php-ext-install └── docker-php-pecl-install ├── 7.1-0.1 ├── Dockerfile ├── config │ ├── apache2.conf │ ├── bashrc │ └── php.ini ├── core │ ├── docker-entrypoint.sh │ ├── envvars │ ├── memcached.conf │ ├── other-vhosts-access-log.conf │ ├── php-smtp.ini │ └── ssmtp.conf ├── docker-php-ext-install └── docker-php-pecl-install ├── 7.1-1.0 ├── Dockerfile ├── config │ ├── apache2.conf │ ├── bashrc │ └── php.ini ├── core │ ├── docker-entrypoint.sh │ ├── envvars │ ├── memcached.conf │ ├── other-vhosts-access-log.conf │ ├── php-smtp.ini │ └── ssmtp.conf ├── docker-php-ext-install └── docker-php-pecl-install ├── 7.1 ├── Dockerfile ├── config │ ├── apache2.conf │ ├── bashrc │ └── php.ini ├── core │ ├── docker-entrypoint.sh │ ├── envvars │ ├── memcached.conf │ ├── other-vhosts-access-log.conf │ ├── php-smtp.ini │ └── ssmtp.conf ├── docker-php-ext-install └── docker-php-pecl-install ├── 7.2-1.0 ├── Dockerfile ├── config │ ├── apache2.conf │ ├── bashrc │ └── php.ini ├── core │ ├── docker-entrypoint.sh │ ├── envvars │ ├── memcached.conf │ ├── msmtprc.conf │ ├── other-vhosts-access-log.conf │ ├── php-smtp.ini │ └── ssmtp.conf ├── docker-php-ext-install └── docker-php-pecl-install ├── 7.2-1.1 ├── Dockerfile ├── config │ ├── apache2.conf │ ├── bashrc │ └── php.ini ├── core │ ├── docker-entrypoint.sh │ ├── envvars │ ├── memcached.conf │ ├── msmtprc.conf │ ├── other-vhosts-access-log.conf │ ├── php-smtp.ini │ └── ssmtp.conf ├── docker-php-ext-install └── docker-php-pecl-install ├── 7.2 ├── Dockerfile ├── config │ ├── apache2.conf │ ├── bashrc │ └── php.ini ├── core │ ├── docker-entrypoint.sh │ ├── envvars │ ├── memcached.conf │ ├── msmtprc.conf │ ├── other-vhosts-access-log.conf │ └── php-smtp.ini ├── docker-php-ext-install └── docker-php-pecl-install ├── 7.3.12 ├── Dockerfile ├── config │ ├── apache2.conf │ ├── bashrc │ └── php.ini └── core │ ├── docker-entrypoint.sh │ ├── envvars │ ├── msmtprc.conf │ ├── other-vhosts-access-log.conf │ └── php-smtp.ini ├── 7.4 ├── Dockerfile ├── config │ ├── apache2.conf │ ├── bashrc │ └── php.ini └── core │ ├── docker-entrypoint.sh │ ├── envvars │ ├── msmtprc.conf │ ├── other-vhosts-access-log.conf │ └── php-smtp.ini ├── 8.0.1 ├── Dockerfile ├── config │ ├── apache2.conf │ ├── bashrc │ └── php.ini └── core │ ├── docker-entrypoint.sh │ ├── envvars │ ├── msmtprc.conf │ ├── other-vhosts-access-log.conf │ └── php-smtp.ini ├── 8.1 ├── Dockerfile ├── config │ ├── apache2.conf │ ├── bashrc │ └── php.ini └── core │ ├── docker-entrypoint.sh │ ├── envvars │ ├── msmtprc.conf │ ├── other-vhosts-access-log.conf │ └── php-smtp.ini ├── 8.2 ├── Dockerfile ├── config │ ├── apache2.conf │ ├── bashrc │ └── php.ini └── core │ ├── docker-entrypoint.sh │ ├── envvars │ ├── msmtprc.conf │ ├── other-vhosts-access-log.conf │ └── php-smtp.ini └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .AppleDouble 3 | .LSOverride 4 | 5 | # Thumbnails 6 | ._* 7 | 8 | # Files that might appear in the root of a volume 9 | .DocumentRevisions-V100 10 | .fseventsd 11 | .Spotlight-V100 12 | .TemporaryItems 13 | .Trashes 14 | .VolumeIcon.icns 15 | 16 | # Directories potentially created on remote AFP share 17 | .AppleDB 18 | .AppleDesktop 19 | Network Trash Folder 20 | Temporary Items 21 | .apdisk 22 | -------------------------------------------------------------------------------- /5.3/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:12.04 2 | 3 | # ADD BASHRC CONFIG 4 | COPY config/bashrc /root/ 5 | RUN mv /root/bashrc /root/.bashrc 6 | 7 | RUN apt-get clean && apt-get update && \ 8 | apt-get install --fix-missing -y \ 9 | apache2 \ 10 | php5 \ 11 | php5-cli \ 12 | libapache2-mod-php5 \ 13 | php5-gd \ 14 | php5-ldap \ 15 | php5-mysql \ 16 | graphviz \ 17 | php5-mcrypt php5-curl php5-memcached php5-xdebug php5-dev php-pear php-soap mysql-client php5-mysql php-apc \ 18 | make curl sudo git \ 19 | ruby-dev rubygems \ 20 | zip \ 21 | wget \ 22 | vim \ 23 | linux-libc-dev \ 24 | libyaml-dev 25 | 26 | # Install PECL packages 27 | # COPY docker-php-pecl-install /usr/local/bin/ 28 | RUN pecl install uploadprogress memcache yaml-1.2.0 29 | RUN echo "extension=yaml.so" >> /etc/php5/apache2/conf.d/yaml.ini 30 | 31 | COPY core/memcached.conf /etc/memcached.conf 32 | COPY config/apache_default /etc/apache2/sites-available/default 33 | COPY core/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh 34 | RUN chmod +x /usr/local/bin/docker-entrypoint.sh 35 | RUN a2enmod rewrite 36 | 37 | # SASS and Compass installation 38 | RUN gem install compass 39 | 40 | # Installation node.js 41 | RUN curl -sL https://deb.nodesource.com/setup_0.12 | sudo bash - 42 | RUN DEBIAN_FRONTEND=noninteractive apt-get -yq --no-install-recommends install -y nodejs 43 | 44 | # Installation of LESS 45 | RUN npm update -g npm && \ 46 | npm install -g less && npm install -g less-plugin-clean-css 47 | 48 | # Installation of Grunt 49 | RUN npm install -g grunt-cli 50 | 51 | # Installation of Gulp 52 | RUN npm install -g gulp 53 | 54 | # Installation of Composer 55 | RUN cd /usr/src && curl -sS http://getcomposer.org/installer | php 56 | RUN cd /usr/src && mv composer.phar /usr/bin/composer 57 | 58 | # Installation of drush 59 | RUN git clone https://github.com/drush-ops/drush.git /usr/local/src/drush 60 | RUN cd /usr/local/src/drush && git checkout 6.2.0 61 | RUN ln -s /usr/local/src/drush/drush /usr/bin/drush 62 | RUN cd /usr/local/src/drush && composer update && composer install 63 | 64 | RUN rm -rf /var/www/html && \ 65 | mkdir -p /var/lock/apache2 /var/run/apache2 /var/log/apache2 /var/www/html && \ 66 | chown -R www-data:www-data /var/lock/apache2 /var/run/apache2 /var/log/apache2 /var/www/html 67 | 68 | # installation of ssmtp 69 | RUN DEBIAN_FRONTEND=noninteractive apt-get install --fix-missing -y ssmtp && rm -r /var/lib/apt/lists/* 70 | ADD core/ssmtp.conf /etc/ssmtp/ssmtp.conf 71 | ADD core/php-smtp.ini /etc/php5/apache2/conf.d/php-smtp.ini 72 | 73 | RUN a2enmod rewrite expires 74 | 75 | VOLUME /var/www/html 76 | 77 | # create directory for ssh keys 78 | RUN mkdir /var/www/.ssh/ 79 | RUN chown -R www-data:www-data /var/www/ 80 | RUN chmod -R 600 /var/www/.ssh/ 81 | 82 | # Set timezone to Europe/Paris 83 | RUN echo "Europe/Paris" > /etc/timezone && dpkg-reconfigure -f noninteractive tzdata 84 | 85 | WORKDIR /var/www/html 86 | 87 | EXPOSE 80 9000 88 | CMD ["/usr/local/bin/docker-entrypoint.sh"] 89 | -------------------------------------------------------------------------------- /5.3/config/apache_default: -------------------------------------------------------------------------------- 1 | 2 | ServerName MYSERVERNAME 3 | ServerAlias MYSERVERALIAS 4 | DocumentRoot "/var/www/html/MYDOCUMENTROOT" 5 | 6 | Options Indexes FollowSymLinks MultiViews 7 | AllowOverride All 8 | Order allow,deny 9 | Allow from all 10 | 11 | #ErrorLog /var/log/apache2/error.log 12 | #LogLevel error 13 | SetEnvIf Remote_Addr "127\.0\.0\.1" loopback 14 | #CustomLog /var/log/apache2/access.log combined env=!loopback 15 | ServerSignature On 16 | 17 | 18 | # vim: syntax=apache ts=4 sw=4 sts=4 sr noet 19 | -------------------------------------------------------------------------------- /5.3/config/bashrc: -------------------------------------------------------------------------------- 1 | alias ll='ls -al' 2 | alias drush='sudo -u www-data drush' 3 | alias git='sudo -u www-data git' 4 | alias wget='sudo -u www-data wget' 5 | alias ssh='sudo -u www-data ssh' 6 | -------------------------------------------------------------------------------- /5.3/core/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | PHP_ERROR_REPORTING=${PHP_ERROR_REPORTING:-"E_ALL & ~E_DEPRECATED & ~E_NOTICE"} 5 | sed -ri 's/^display_errors\s*=\s*Off/display_errors = On/g' /etc/php5/apache2/php.ini 6 | sed -ri 's/^display_errors\s*=\s*Off/display_errors = On/g' /etc/php5/cli/php.ini 7 | sed -ri "s/^error_reporting\s*=.*$//g" /etc/php5/apache2/php.ini 8 | sed -ri "s/^error_reporting\s*=.*$//g" /etc/php5/cli/php.ini 9 | echo "error_reporting = $PHP_ERROR_REPORTING" >> /etc/php5/apache2/php.ini 10 | echo "error_reporting = $PHP_ERROR_REPORTING" >> /etc/php5/cli/php.ini 11 | # PHP.ini CUSTOM 12 | phpmemory_limit=512M 13 | phppostmaxsize=100M 14 | phpuploadmaxfilesize=100M 15 | sed -i 's/memory_limit = 128M/memory_limit = '${phpmemory_limit}'/' /etc/php5/apache2/php.ini 16 | sed -i 's/post_max_size = 8M/post_max_size = '${phppostmaxsize}'/' /etc/php5/apache2/php.ini 17 | sed -i 's/upload_max_filesize = 2M/upload_max_filesize = '${phpuploadmaxfilesize}'/' /etc/php5/apache2/php.ini 18 | 19 | echo "extension=memcache.so" > /etc/php5/apache2/conf.d/memcache.ini 20 | echo "extension=uploadprogress.so" > /etc/php5/apache2/conf.d/uploadprogress.ini 21 | 22 | # Set the apache user and group to match the host user. 23 | # This script will change the www-data UID/GID in the container from to 33 (default) to the UID/GID of the host user, if the current host user is not root. 24 | OWNER=$(stat -c '%u' /var/www/html) 25 | GROUP=$(stat -c '%g' /var/www/html) 26 | USERNAME=www-data 27 | [ -e "/etc/debian_version" ] || USERNAME=apache 28 | if [ "$OWNER" != "0" ]; then 29 | usermod -o -u $OWNER $USERNAME 30 | usermod -s /bin/bash $USERNAME 31 | groupmod -o -g $GROUP $USERNAME 32 | usermod -d /var/www/html $USERNAME 33 | chown -R --silent $USERNAME:$USERNAME /var/www/html 34 | fi 35 | echo The apache user and group has been set to the following: 36 | id $USERNAME 37 | 38 | usermod -d /var/www www-data 39 | 40 | # Apache2 custom servername, alias and documentroot 41 | sed -i "s/MYSERVERNAME/$SERVERNAME/g" /etc/apache2/sites-available/default 42 | sed -i "s/MYSERVERALIAS/$SERVERALIAS/g" /etc/apache2/sites-available/default 43 | sed -i "s/MYDOCUMENTROOT/$DOCUMENTROOT/g" /etc/apache2/sites-available/default 44 | 45 | # Apache gets grumpy about PID files pre-existing 46 | rm -f /var/run/apache2/apache2.pid 47 | 48 | # Start Apache in foreground 49 | source /etc/apache2/envvars && exec /usr/sbin/apache2 -DFOREGROUND 50 | -------------------------------------------------------------------------------- /5.3/core/memcached.conf: -------------------------------------------------------------------------------- 1 | # memcached default config file 2 | # 2003 - Jay Bonci 3 | # This configuration file is read by the start-memcached script provided as 4 | # part of the Debian GNU/Linux distribution. 5 | 6 | # Run memcached as a daemon. This command is implied, and is not needed for the 7 | # daemon to run. See the README.Debian that comes with this package for more 8 | # information. 9 | -d 10 | 11 | # Log memcached's output to /var/log/memcached 12 | logfile /var/log/memcached.log 13 | 14 | # Be verbose 15 | # -v 16 | 17 | # Be even more verbose (print client commands as well) 18 | # -vv 19 | 20 | # Start with a cap of 64 megs of memory. It's reasonable, and the daemon default 21 | # Note that the daemon will grow to this size, but does not start out holding this much 22 | # memory 23 | -m 64 24 | 25 | # Default connection port is 11211 26 | -p 11211 27 | 28 | # Run the daemon as root. The start-memcached will default to running as root if no 29 | # -u command is present in this config file 30 | -u memcache 31 | 32 | # Specify which IP address to listen on. The default is to listen on all IP addresses 33 | # This parameter is one of the only security measures that memcached has, so make sure 34 | # it's listening on a firewalled interface. 35 | -l memcache 36 | 37 | # Limit the number of simultaneous incoming connections. The daemon default is 1024 38 | # -c 1024 39 | 40 | # Lock down all paged memory. Consult with the README and homepage before you do this 41 | # -k 42 | 43 | # Return error when memory is exhausted (rather than removing items) 44 | # -M 45 | 46 | # Maximize core file limit 47 | # -r 48 | -------------------------------------------------------------------------------- /5.3/core/php-smtp.ini: -------------------------------------------------------------------------------- 1 | ; This ini file sets the php sendmail path to ssmtp. Nothing more. 2 | 3 | [mail function] 4 | sendmail_path = /usr/sbin/ssmtp -t 5 | -------------------------------------------------------------------------------- /5.3/core/ssmtp.conf: -------------------------------------------------------------------------------- 1 | # Configuartion file for sSMTP sendmail 2 | 3 | # The person who gets all mail for userids < 1000 4 | # Make this empty to disable rewriting. 5 | root= 6 | 7 | # We want to use this with an exim container. Link these 8 | # so that that container will be reachable as 'exim' in 9 | # this container. 10 | mailhub=mailhog:1025 11 | 12 | # Where will the mail seem to come from? 13 | #rewriteDomain= 14 | 15 | # The full hostname 16 | #hostname= 17 | 18 | # Are users allowed to set their own From: address? (YES/NO) 19 | FromLineOverride=YES 20 | -------------------------------------------------------------------------------- /5.4/Dockerfile: -------------------------------------------------------------------------------- 1 | # Pull base image. 2 | FROM php:5.4-apache 3 | COPY config/php.ini /usr/local/etc/php/ 4 | 5 | # ADD BASHRC CONFIG 6 | COPY config/bashrc /root/ 7 | RUN mv /root/bashrc /root/.bashrc 8 | 9 | RUN apt-get clean && apt-get update && apt-get install --fix-missing -y \ 10 | ruby-dev \ 11 | rubygems \ 12 | imagemagick \ 13 | graphviz \ 14 | sudo \ 15 | git \ 16 | vim \ 17 | memcached \ 18 | libmemcached-tools \ 19 | php5-memcached \ 20 | php5-dev \ 21 | libpng12-dev \ 22 | libjpeg62-turbo-dev \ 23 | libmcrypt-dev \ 24 | libxml2-dev \ 25 | libxslt1-dev \ 26 | mysql-client \ 27 | php5-mysqlnd \ 28 | zip \ 29 | wget \ 30 | linux-libc-dev \ 31 | libyaml-dev \ 32 | apt-transport-https \ 33 | zlib1g-dev \ 34 | libicu-dev \ 35 | libpq-dev 36 | 37 | # Install PECL packages 38 | COPY docker-php-pecl-install /usr/local/bin/ 39 | RUN chmod +x /usr/local/bin/docker-php-pecl-install 40 | RUN docker-php-pecl-install \ 41 | uploadprogress-1.0.3.1 \ 42 | memcache-3.0.8 \ 43 | yaml-1.2.0 \ 44 | mongo-1.6.12 \ 45 | apc-3.1.13 46 | 47 | COPY docker-php-ext-install /usr/local/bin/ 48 | RUN chmod +x /usr/local/bin/docker-php-ext-install 49 | RUN docker-php-ext-configure gd --with-jpeg-dir=/usr/include/ \ 50 | && docker-php-ext-install \ 51 | gd \ 52 | mbstring \ 53 | mcrypt \ 54 | zip \ 55 | soap \ 56 | mysql \ 57 | pdo_mysql \ 58 | mysqli \ 59 | xsl \ 60 | calendar \ 61 | intl \ 62 | exif \ 63 | pgsql \ 64 | pdo_pgsql \ 65 | ftp 66 | 67 | COPY core/memcached.conf /etc/memcached.conf 68 | 69 | # install xdebug and codesniffer 70 | RUN apt-get install --fix-missing php5-xdebug -y; \ 71 | pecl install xdebug; \ 72 | echo 'zend_extension = /usr/local/lib/php/extensions/no-debug-non-zts-20100525/xdebug.so' >> /usr/local/etc/php/php.ini; \ 73 | touch /usr/local/etc/php/conf.d/xdebug.ini &&\ 74 | echo xdebug.remote_enable=1 >> /usr/local/etc/php/conf.d/xdebug.ini &&\ 75 | echo xdebug.remote_autostart=0 >> /usr/local/etc/php/conf.d/xdebug.ini &&\ 76 | echo xdebug.remote_connect_back=1 >> /usr/local/etc/php/conf.d/xdebug.ini &&\ 77 | echo xdebug.remote_port=9000 >> /usr/local/etc/php/conf.d/xdebug.ini &&\ 78 | echo xdebug.remote_log=/tmp/php5-xdebug.log >> /usr/local/etc/php/conf.d/xdebug.ini; \ 79 | 80 | # SASS and Compass installation 81 | gem install compass; \ 82 | 83 | # Installation node.js 84 | curl -sL https://deb.nodesource.com/setup_0.12 | sudo bash -; \ 85 | DEBIAN_FRONTEND=noninteractive apt-get -yq --no-install-recommends install -y nodejs; \ 86 | 87 | # Installation of LESS 88 | npm update -g npm && \ 89 | npm install -g less && npm install -g less-plugin-clean-css; \ 90 | 91 | # Installation of Grunt 92 | npm install -g grunt-cli; \ 93 | 94 | # Installation of Gulp 95 | npm install -g gulp; \ 96 | 97 | # Installation of Composer 98 | cd /usr/src && curl -sS http://getcomposer.org/installer | php; \ 99 | cd /usr/src && mv composer.phar /usr/bin/composer; \ 100 | 101 | # Installation of drush 102 | git clone https://github.com/drush-ops/drush.git /usr/local/src/drush; \ 103 | cd /usr/local/src/drush && git checkout 8.0.5; \ 104 | ln -s /usr/local/src/drush/drush /usr/bin/drush; \ 105 | cd /usr/local/src/drush && composer update && composer install; \ 106 | 107 | # Add drush components 108 | mkdir /var/www/.drush; \ 109 | cd /var/www/.drush && wget https://ftp.drupal.org/files/projects/registry_rebuild-7.x-2.3.zip && unzip registry_rebuild-7.x-2.3.zip; \ 110 | cd /var/www/.drush && wget https://ftp.drupal.org/files/projects/site_audit-7.x-1.15.zip && unzip site_audit-7.x-1.15.zip; \ 111 | cd /var/www/.drush && rm *.zip; \ 112 | chown -R www-data:www-data /var/www; \ 113 | sudo -u www-data drush cc drush; \ 114 | 115 | # Installation of PHP_CodeSniffer with Drupal coding standards. 116 | # See https://www.drupal.org/node/1419988#coder-composer 117 | composer global require drupal/coder; \ 118 | ln -s ~/.composer/vendor/bin/phpcs /usr/local/bin; \ 119 | ln -s ~/.composer/vendor/bin/phpcbf /usr/local/bin; \ 120 | phpcs --config-set installed_paths ~/.composer/vendor/drupal/coder/coder_sniffer 121 | 122 | RUN rm -rf /var/www/html && \ 123 | mkdir -p /var/lock/apache2 /var/run/apache2 /var/log/apache2 /var/www/html && \ 124 | chown -R www-data:www-data /var/lock/apache2 /var/run/apache2 /var/log/apache2 /var/www/html 125 | 126 | # installation of ssmtp 127 | RUN DEBIAN_FRONTEND=noninteractive apt-get install --fix-missing -y ssmtp && rm -r /var/lib/apt/lists/* 128 | ADD core/ssmtp.conf /etc/ssmtp/ssmtp.conf 129 | ADD core/php-smtp.ini /usr/local/etc/php/conf.d/php-smtp.ini 130 | 131 | COPY config/apache2.conf /etc/apache2 132 | RUN chown -R www-data:www-data /var/www 133 | 134 | RUN a2enmod rewrite expires && service apache2 restart 135 | 136 | # install phing 137 | RUN pear channel-discover pear.phing.info && pear install [--alldeps] phing/phing 138 | 139 | # install phpcpd 140 | RUN wget https://phar.phpunit.de/phpcpd.phar && chmod +x phpcpd.phar && mv phpcpd.phar /usr/local/bin/phpcpd 141 | 142 | # install phpmetrics 143 | RUN wget https://github.com/phpmetrics/PhpMetrics/raw/master/build/phpmetrics.phar && chmod +x phpmetrics.phar && mv phpmetrics.phar /usr/local/bin/phpmetrics 144 | 145 | # Our apache volume 146 | VOLUME /var/www/html 147 | 148 | # create directory for ssh keys 149 | RUN mkdir /var/www/.ssh/ 150 | RUN chown -R www-data:www-data /var/www/ 151 | RUN chmod -R 600 /var/www/.ssh/ 152 | 153 | # Set timezone to Europe/Paris 154 | RUN echo "Europe/Paris" > /etc/timezone && dpkg-reconfigure -f noninteractive tzdata 155 | 156 | # Expose 80 for apache, 9000 for xdebug 157 | EXPOSE 80 9000 158 | 159 | # Set a custom entrypoint. 160 | COPY core/docker-entrypoint.sh / 161 | RUN chmod +x /docker-entrypoint.sh 162 | ENTRYPOINT ["/docker-entrypoint.sh"] 163 | -------------------------------------------------------------------------------- /5.4/config/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 | 39 | ServerName MYSERVERNAME 40 | ServerAlias MYSERVERALIAS 41 | DocumentRoot "/var/www/html/MYDOCUMENTROOT" 42 | 43 | Options Indexes FollowSymLinks MultiViews 44 | AllowOverride All 45 | Order allow,deny 46 | Allow from all 47 | 48 | #ErrorLog /var/log/apache2/error.log 49 | #LogLevel error 50 | SetEnvIf Remote_Addr "127\.0\.0\.1" loopback 51 | #CustomLog /var/log/apache2/access.log combined env=!loopback 52 | ServerSignature On 53 | 54 | 55 | AccessFileName .htaccess 56 | 57 | Require all denied 58 | 59 | 60 | LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined 61 | LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined 62 | LogFormat "%h %l %u %t \"%r\" %>s %O" common 63 | LogFormat "%{Referer}i -> %U" referer 64 | LogFormat "%{User-agent}i" agent 65 | 66 | CustomLog /proc/self/fd/1 combined 67 | 68 | 69 | SetHandler application/x-httpd-php 70 | 71 | 72 | # Multiple DirectoryIndex directives within the same context will add 73 | # to the list of resources to look for rather than replace 74 | # https://httpd.apache.org/docs/current/mod/mod_dir.html#directoryindex 75 | DirectoryIndex disabled 76 | DirectoryIndex index.php index.html 77 | 78 | IncludeOptional conf-enabled/*.conf 79 | IncludeOptional sites-enabled/*.conf 80 | -------------------------------------------------------------------------------- /5.4/config/bashrc: -------------------------------------------------------------------------------- 1 | alias ll='ls -al' 2 | alias drush='sudo -u www-data drush' 3 | alias git='sudo -u www-data git' 4 | alias ssh='sudo -u www-data ssh' 5 | 6 | alias drupalcs="phpcs --standard=Drupal --extensions='php,module,inc,install,test,profile,theme,js,css,info,txt'" 7 | alias drupalbp="phpcs --standard=DrupalPractice --extensions=php,module,inc,install,test,profile,theme,js,css,info,txt,md" 8 | -------------------------------------------------------------------------------- /5.4/core/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | set -e 3 | 4 | # Set the apache user and group to match the host user. 5 | # This script will change the www-data UID/GID in the container from to 33 (default) to the UID/GID of the host user, if the current host user is not root. 6 | OWNER=$(stat -c '%u' /var/www/html) 7 | GROUP=$(stat -c '%g' /var/www/html) 8 | USERNAME=www-data 9 | [ -e "/etc/debian_version" ] || USERNAME=apache 10 | if [ "$OWNER" != "0" ]; then 11 | usermod -o -u $OWNER $USERNAME 12 | usermod -s /bin/bash $USERNAME 13 | groupmod -o -g $GROUP $USERNAME 14 | usermod -d /var/www/html $USERNAME 15 | chown -R --silent $USERNAME:$USERNAME /var/www/html 16 | fi 17 | echo The apache user and group has been set to the following: 18 | id $USERNAME 19 | 20 | usermod -d /var/www www-data 21 | 22 | # Apache2 custom servername, alias and documentroot 23 | sed -i "s/MYSERVERNAME/$SERVERNAME/g" /etc/apache2/apache2.conf 24 | sed -i "s/MYSERVERALIAS/$SERVERALIAS/g" /etc/apache2/apache2.conf 25 | sed -i "s/MYDOCUMENTROOT/$DOCUMENTROOT/g" /etc/apache2/apache2.conf 26 | 27 | # Apache gets grumpy about PID files pre-existing 28 | rm -f /var/run/apache2/apache2.pid 29 | 30 | # Start Apache in foreground 31 | /usr/sbin/apache2 -DFOREGROUND 32 | -------------------------------------------------------------------------------- /5.4/core/memcached.conf: -------------------------------------------------------------------------------- 1 | # memcached default config file 2 | # 2003 - Jay Bonci 3 | # This configuration file is read by the start-memcached script provided as 4 | # part of the Debian GNU/Linux distribution. 5 | 6 | # Run memcached as a daemon. This command is implied, and is not needed for the 7 | # daemon to run. See the README.Debian that comes with this package for more 8 | # information. 9 | -d 10 | 11 | # Log memcached's output to /var/log/memcached 12 | logfile /var/log/memcached.log 13 | 14 | # Be verbose 15 | # -v 16 | 17 | # Be even more verbose (print client commands as well) 18 | # -vv 19 | 20 | # Start with a cap of 64 megs of memory. It's reasonable, and the daemon default 21 | # Note that the daemon will grow to this size, but does not start out holding this much 22 | # memory 23 | -m 64 24 | 25 | # Default connection port is 11211 26 | -p 11211 27 | 28 | # Run the daemon as root. The start-memcached will default to running as root if no 29 | # -u command is present in this config file 30 | -u memcache 31 | 32 | # Specify which IP address to listen on. The default is to listen on all IP addresses 33 | # This parameter is one of the only security measures that memcached has, so make sure 34 | # it's listening on a firewalled interface. 35 | -l memcache 36 | 37 | # Limit the number of simultaneous incoming connections. The daemon default is 1024 38 | # -c 1024 39 | 40 | # Lock down all paged memory. Consult with the README and homepage before you do this 41 | # -k 42 | 43 | # Return error when memory is exhausted (rather than removing items) 44 | # -M 45 | 46 | # Maximize core file limit 47 | # -r 48 | -------------------------------------------------------------------------------- /5.4/core/php-smtp.ini: -------------------------------------------------------------------------------- 1 | ; This ini file sets the php sendmail path to ssmtp. Nothing more. 2 | 3 | [mail function] 4 | sendmail_path = /usr/sbin/ssmtp -t 5 | -------------------------------------------------------------------------------- /5.4/core/ssmtp.conf: -------------------------------------------------------------------------------- 1 | # Configuartion file for sSMTP sendmail 2 | 3 | # The person who gets all mail for userids < 1000 4 | # Make this empty to disable rewriting. 5 | root= 6 | 7 | # We want to use this with an exim container. Link these 8 | # so that that container will be reachable as 'exim' in 9 | # this container. 10 | mailhub=mailhog:1025 11 | 12 | # Where will the mail seem to come from? 13 | #rewriteDomain= 14 | 15 | # The full hostname 16 | #hostname= 17 | 18 | # Are users allowed to set their own From: address? (YES/NO) 19 | FromLineOverride=YES 20 | -------------------------------------------------------------------------------- /5.4/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 | -------------------------------------------------------------------------------- /5.4/docker-php-pecl-install: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | usage() { 5 | echo "usage: $0 [channel/] ..." 6 | echo " ie: $0 uploadprogress oauth-1.2.3" 7 | } 8 | 9 | if [ $# -eq 0 ]; then 10 | usage >&2 11 | exit 1 12 | fi 13 | 14 | pecl install "$@" 15 | 16 | while [ $# -gt 0 ]; do 17 | ext="$1" 18 | ext=$(echo "$ext" | cut -d- -f1) 19 | ext=$(echo "$ext" | cut -d\/ -f2) 20 | shift 21 | 22 | for module in $(find /usr/local/lib/php/extensions -name "$ext.so"); do 23 | ini="/usr/local/etc/php/conf.d/docker-php-pecl-$ext.ini" 24 | if grep -q zend_extension_entry "$module"; then 25 | # https://wiki.php.net/internals/extensions#loading_zend_extensions 26 | line="zend_extension=$(basename "$module")" 27 | else 28 | line="extension=$(basename "$module")" 29 | fi 30 | if ! grep -q "$line" "$ini" 2>/dev/null; then 31 | echo "$line" >> "$ini" 32 | fi 33 | done 34 | done 35 | 36 | rm -rf /tmp/* 37 | -------------------------------------------------------------------------------- /5.5/config/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 | 39 | ServerName MYSERVERNAME 40 | ServerAlias MYSERVERALIAS 41 | DocumentRoot "/var/www/html/MYDOCUMENTROOT" 42 | 43 | Options Indexes FollowSymLinks MultiViews 44 | AllowOverride All 45 | Order allow,deny 46 | Allow from all 47 | 48 | #ErrorLog /var/log/apache2/error.log 49 | #LogLevel error 50 | SetEnvIf Remote_Addr "127\.0\.0\.1" loopback 51 | #CustomLog /var/log/apache2/access.log combined env=!loopback 52 | ServerSignature On 53 | 54 | 55 | AccessFileName .htaccess 56 | 57 | Require all denied 58 | 59 | 60 | LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined 61 | LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined 62 | LogFormat "%h %l %u %t \"%r\" %>s %O" common 63 | LogFormat "%{Referer}i -> %U" referer 64 | LogFormat "%{User-agent}i" agent 65 | 66 | CustomLog /proc/self/fd/1 combined 67 | 68 | 69 | SetHandler application/x-httpd-php 70 | 71 | 72 | # Multiple DirectoryIndex directives within the same context will add 73 | # to the list of resources to look for rather than replace 74 | # https://httpd.apache.org/docs/current/mod/mod_dir.html#directoryindex 75 | DirectoryIndex disabled 76 | DirectoryIndex index.php index.html 77 | 78 | IncludeOptional conf-enabled/*.conf 79 | IncludeOptional sites-enabled/*.conf 80 | -------------------------------------------------------------------------------- /5.5/config/bashrc: -------------------------------------------------------------------------------- 1 | alias ll='ls -al' 2 | alias drush='sudo -u www-data drush' 3 | alias git='sudo -u www-data git' 4 | alias ssh='sudo -u www-data ssh' 5 | alias drupal='sudo -u www-data drupal' 6 | 7 | alias drupalcs="phpcs --standard=Drupal --extensions='php,module,inc,install,test,profile,theme,js,css,info,txt'" 8 | alias drupalbp="phpcs --standard=DrupalPractice --extensions=php,module,inc,install,test,profile,theme,js,css,info,txt,md" 9 | -------------------------------------------------------------------------------- /5.5/core/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | set -e 3 | 4 | # Set the apache user and group to match the host user. 5 | # This script will change the www-data UID/GID in the container from to 33 (default) to the UID/GID of the host user, if the current host user is not root. 6 | OWNER=$(stat -c '%u' /var/www/html) 7 | GROUP=$(stat -c '%g' /var/www/html) 8 | USERNAME=www-data 9 | [ -e "/etc/debian_version" ] || USERNAME=apache 10 | if [ "$OWNER" != "0" ]; then 11 | usermod -o -u $OWNER $USERNAME 12 | usermod -s /bin/bash $USERNAME 13 | groupmod -o -g $GROUP $USERNAME 14 | usermod -d /var/www/html $USERNAME 15 | chown -R --silent $USERNAME:$USERNAME /var/www/html 16 | fi 17 | echo The apache user and group has been set to the following: 18 | id $USERNAME 19 | 20 | usermod -d /var/www www-data 21 | 22 | # Apache2 custom servername, alias and documentroot 23 | sed -i "s/MYSERVERNAME/$SERVERNAME/g" /etc/apache2/apache2.conf 24 | sed -i "s/MYSERVERALIAS/$SERVERALIAS/g" /etc/apache2/apache2.conf 25 | sed -i "s/MYDOCUMENTROOT/$DOCUMENTROOT/g" /etc/apache2/apache2.conf 26 | 27 | # Apache gets grumpy about PID files pre-existing 28 | rm -f /var/run/apache2/apache2.pid 29 | 30 | # Start Apache in foreground 31 | /usr/sbin/apache2 -DFOREGROUND 32 | -------------------------------------------------------------------------------- /5.5/core/memcached.conf: -------------------------------------------------------------------------------- 1 | # memcached default config file 2 | # 2003 - Jay Bonci 3 | # This configuration file is read by the start-memcached script provided as 4 | # part of the Debian GNU/Linux distribution. 5 | 6 | # Run memcached as a daemon. This command is implied, and is not needed for the 7 | # daemon to run. See the README.Debian that comes with this package for more 8 | # information. 9 | -d 10 | 11 | # Log memcached's output to /var/log/memcached 12 | logfile /var/log/memcached.log 13 | 14 | # Be verbose 15 | # -v 16 | 17 | # Be even more verbose (print client commands as well) 18 | # -vv 19 | 20 | # Start with a cap of 64 megs of memory. It's reasonable, and the daemon default 21 | # Note that the daemon will grow to this size, but does not start out holding this much 22 | # memory 23 | -m 64 24 | 25 | # Default connection port is 11211 26 | -p 11211 27 | 28 | # Run the daemon as root. The start-memcached will default to running as root if no 29 | # -u command is present in this config file 30 | -u memcache 31 | 32 | # Specify which IP address to listen on. The default is to listen on all IP addresses 33 | # This parameter is one of the only security measures that memcached has, so make sure 34 | # it's listening on a firewalled interface. 35 | -l memcache 36 | 37 | # Limit the number of simultaneous incoming connections. The daemon default is 1024 38 | # -c 1024 39 | 40 | # Lock down all paged memory. Consult with the README and homepage before you do this 41 | # -k 42 | 43 | # Return error when memory is exhausted (rather than removing items) 44 | # -M 45 | 46 | # Maximize core file limit 47 | # -r 48 | -------------------------------------------------------------------------------- /5.5/core/php-smtp.ini: -------------------------------------------------------------------------------- 1 | ; This ini file sets the php sendmail path to ssmtp. Nothing more. 2 | 3 | [mail function] 4 | sendmail_path = /usr/sbin/ssmtp -t 5 | -------------------------------------------------------------------------------- /5.5/core/ssmtp.conf: -------------------------------------------------------------------------------- 1 | # Configuartion file for sSMTP sendmail 2 | 3 | # The person who gets all mail for userids < 1000 4 | # Make this empty to disable rewriting. 5 | root= 6 | 7 | # We want to use this with an exim container. Link these 8 | # so that that container will be reachable as 'exim' in 9 | # this container. 10 | mailhub=mailhog:1025 11 | 12 | # Where will the mail seem to come from? 13 | #rewriteDomain= 14 | 15 | # The full hostname 16 | #hostname= 17 | 18 | # Are users allowed to set their own From: address? (YES/NO) 19 | FromLineOverride=YES 20 | -------------------------------------------------------------------------------- /5.5/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 | -------------------------------------------------------------------------------- /5.5/docker-php-pecl-install: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | usage() { 5 | echo "usage: $0 [channel/] ..." 6 | echo " ie: $0 uploadprogress oauth-1.2.3" 7 | } 8 | 9 | if [ $# -eq 0 ]; then 10 | usage >&2 11 | exit 1 12 | fi 13 | 14 | pecl install "$@" 15 | 16 | while [ $# -gt 0 ]; do 17 | ext="$1" 18 | ext=$(echo "$ext" | cut -d- -f1) 19 | ext=$(echo "$ext" | cut -d\/ -f2) 20 | shift 21 | 22 | for module in $(find /usr/local/lib/php/extensions -name "$ext.so"); do 23 | ini="/usr/local/etc/php/conf.d/docker-php-pecl-$ext.ini" 24 | if grep -q zend_extension_entry "$module"; then 25 | # https://wiki.php.net/internals/extensions#loading_zend_extensions 26 | line="zend_extension=$(basename "$module")" 27 | else 28 | line="extension=$(basename "$module")" 29 | fi 30 | if ! grep -q "$line" "$ini" 2>/dev/null; then 31 | echo "$line" >> "$ini" 32 | fi 33 | done 34 | done 35 | 36 | rm -rf /tmp/* 37 | -------------------------------------------------------------------------------- /5.6-bcmath/Dockerfile: -------------------------------------------------------------------------------- 1 | # Pull base image. 2 | FROM actency/docker-apache-php:5.6 3 | 4 | RUN docker-php-ext-install \ 5 | bcmath 6 | 7 | ENTRYPOINT ["/docker-entrypoint.sh"] 8 | -------------------------------------------------------------------------------- /5.6-ldap/config/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 | 39 | ServerName MYSERVERNAME 40 | ServerAlias MYSERVERALIAS 41 | DocumentRoot "/var/www/html/MYDOCUMENTROOT" 42 | 43 | Options Indexes FollowSymLinks MultiViews 44 | AllowOverride All 45 | Order allow,deny 46 | Allow from all 47 | 48 | #ErrorLog /var/log/apache2/error.log 49 | #LogLevel error 50 | SetEnvIf Remote_Addr "127\.0\.0\.1" loopback 51 | #CustomLog /var/log/apache2/access.log combined env=!loopback 52 | ServerSignature On 53 | 54 | 55 | AccessFileName .htaccess 56 | 57 | Require all denied 58 | 59 | 60 | LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined 61 | LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined 62 | LogFormat "%h %l %u %t \"%r\" %>s %O" common 63 | LogFormat "%{Referer}i -> %U" referer 64 | LogFormat "%{User-agent}i" agent 65 | 66 | CustomLog /proc/self/fd/1 combined 67 | 68 | 69 | SetHandler application/x-httpd-php 70 | 71 | 72 | # Multiple DirectoryIndex directives within the same context will add 73 | # to the list of resources to look for rather than replace 74 | # https://httpd.apache.org/docs/current/mod/mod_dir.html#directoryindex 75 | DirectoryIndex disabled 76 | DirectoryIndex index.php index.html 77 | 78 | IncludeOptional conf-enabled/*.conf 79 | IncludeOptional sites-enabled/*.conf 80 | -------------------------------------------------------------------------------- /5.6-ldap/config/bashrc: -------------------------------------------------------------------------------- 1 | alias ll='ls -al' 2 | alias drush='sudo -u www-data drush' 3 | alias git='sudo -u www-data git' 4 | alias ssh='sudo -u www-data ssh' 5 | alias drupal='sudo -u www-data drupal' 6 | 7 | alias drupalcs="phpcs --standard=Drupal --extensions='php,module,inc,install,test,profile,theme,js,css,info,txt'" 8 | alias drupalbp="phpcs --standard=DrupalPractice --extensions=php,module,inc,install,test,profile,theme,js,css,info,txt,md" 9 | -------------------------------------------------------------------------------- /5.6-ldap/core/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | set -e 3 | 4 | # Set the apache user and group to match the host user. 5 | # This script will change the www-data UID/GID in the container from to 33 (default) to the UID/GID of the host user, if the current host user is not root. 6 | OWNER=$(stat -c '%u' /var/www/html) 7 | GROUP=$(stat -c '%g' /var/www/html) 8 | USERNAME=www-data 9 | [ -e "/etc/debian_version" ] || USERNAME=apache 10 | if [ "$OWNER" != "0" ]; then 11 | usermod -o -u $OWNER $USERNAME 12 | usermod -s /bin/bash $USERNAME 13 | groupmod -o -g $GROUP $USERNAME 14 | usermod -d /var/www/html $USERNAME 15 | chown -R --silent $USERNAME:$USERNAME /var/www/html 16 | fi 17 | echo The apache user and group has been set to the following: 18 | id $USERNAME 19 | 20 | usermod -d /var/www www-data 21 | 22 | # Apache2 custom servername, alias and documentroot 23 | sed -i "s/MYSERVERNAME/$SERVERNAME/g" /etc/apache2/apache2.conf 24 | sed -i "s/MYSERVERALIAS/$SERVERALIAS/g" /etc/apache2/apache2.conf 25 | sed -i "s/MYDOCUMENTROOT/$DOCUMENTROOT/g" /etc/apache2/apache2.conf 26 | 27 | # Apache gets grumpy about PID files pre-existing 28 | rm -f /var/run/apache2/apache2.pid 29 | 30 | # Start Apache in foreground 31 | /usr/sbin/apache2 -DFOREGROUND 32 | -------------------------------------------------------------------------------- /5.6-ldap/core/envvars: -------------------------------------------------------------------------------- 1 | # envvars - default environment variables for apache2ctl 2 | 3 | # this won't be correct after changing uid 4 | unset HOME 5 | 6 | # for supporting multiple apache2 instances 7 | if [ "${APACHE_CONFDIR##/etc/apache2-}" != "${APACHE_CONFDIR}" ] ; then 8 | SUFFIX="-${APACHE_CONFDIR##/etc/apache2-}" 9 | else 10 | SUFFIX= 11 | fi 12 | 13 | # Since there is no sane way to get the parsed apache2 config in scripts, some 14 | # settings are defined via environment variables and then used in apache2ctl, 15 | # /etc/init.d/apache2, /etc/logrotate.d/apache2, etc. 16 | export APACHE_RUN_USER=www-data 17 | export APACHE_RUN_GROUP=www-data 18 | # temporary state file location. This might be changed to /run in Wheezy+1 19 | export APACHE_PID_FILE=/var/run/apache2/apache2$SUFFIX.pid 20 | export APACHE_RUN_DIR=/var/run/apache2$SUFFIX 21 | export APACHE_LOCK_DIR=/var/lock/apache2$SUFFIX 22 | # Only /var/log/apache2 is handled by /etc/logrotate.d/apache2. 23 | export APACHE_LOG_DIR=/var/log/apache2$SUFFIX 24 | 25 | ## The locale used by some modules like mod_dav 26 | export LANG=C 27 | ## Uncomment the following line to use the system default locale instead: 28 | #. /etc/default/locale 29 | 30 | export LANG 31 | 32 | ## The command to get the status for 'apache2ctl status'. 33 | ## Some packages providing 'www-browser' need '--dump' instead of '-dump'. 34 | #export APACHE_LYNX='www-browser -dump' 35 | 36 | ## If you need a higher file descriptor limit, uncomment and adjust the 37 | ## following line (default is 8192): 38 | #APACHE_ULIMIT_MAX_FILES='ulimit -n 65536' 39 | 40 | ## If you would like to pass arguments to the web server, add them below 41 | ## to the APACHE_ARGUMENTS environment. 42 | #export APACHE_ARGUMENTS='' 43 | 44 | ## Enable the debug mode for maintainer scripts. 45 | ## This will produce a verbose output on package installations of web server modules and web application 46 | ## installations which interact with Apache 47 | #export APACHE2_MAINTSCRIPT_DEBUG=1 48 | -------------------------------------------------------------------------------- /5.6-ldap/core/memcached.conf: -------------------------------------------------------------------------------- 1 | # memcached default config file 2 | # 2003 - Jay Bonci 3 | # This configuration file is read by the start-memcached script provided as 4 | # part of the Debian GNU/Linux distribution. 5 | 6 | # Run memcached as a daemon. This command is implied, and is not needed for the 7 | # daemon to run. See the README.Debian that comes with this package for more 8 | # information. 9 | -d 10 | 11 | # Log memcached's output to /var/log/memcached 12 | logfile /var/log/memcached.log 13 | 14 | # Be verbose 15 | # -v 16 | 17 | # Be even more verbose (print client commands as well) 18 | # -vv 19 | 20 | # Start with a cap of 64 megs of memory. It's reasonable, and the daemon default 21 | # Note that the daemon will grow to this size, but does not start out holding this much 22 | # memory 23 | -m 64 24 | 25 | # Default connection port is 11211 26 | -p 11211 27 | 28 | # Run the daemon as root. The start-memcached will default to running as root if no 29 | # -u command is present in this config file 30 | -u memcache 31 | 32 | # Specify which IP address to listen on. The default is to listen on all IP addresses 33 | # This parameter is one of the only security measures that memcached has, so make sure 34 | # it's listening on a firewalled interface. 35 | -l memcache 36 | 37 | # Limit the number of simultaneous incoming connections. The daemon default is 1024 38 | # -c 1024 39 | 40 | # Lock down all paged memory. Consult with the README and homepage before you do this 41 | # -k 42 | 43 | # Return error when memory is exhausted (rather than removing items) 44 | # -M 45 | 46 | # Maximize core file limit 47 | # -r 48 | -------------------------------------------------------------------------------- /5.6-ldap/core/other-vhosts-access-log.conf: -------------------------------------------------------------------------------- 1 | # Define an access log for VirtualHosts that don't define their own logfile 2 | #CustomLog ${APACHE_LOG_DIR}/other_vhosts_access.log vhost_combined 3 | 4 | # vim: syntax=apache ts=4 sw=4 sts=4 sr noet 5 | -------------------------------------------------------------------------------- /5.6-ldap/core/php-smtp.ini: -------------------------------------------------------------------------------- 1 | ; This ini file sets the php sendmail path to ssmtp. Nothing more. 2 | 3 | [mail function] 4 | sendmail_path = /usr/sbin/ssmtp -t 5 | -------------------------------------------------------------------------------- /5.6-ldap/core/ssmtp.conf: -------------------------------------------------------------------------------- 1 | # Configuartion file for sSMTP sendmail 2 | 3 | # The person who gets all mail for userids < 1000 4 | # Make this empty to disable rewriting. 5 | root= 6 | 7 | # We want to use this with an exim container. Link these 8 | # so that that container will be reachable as 'exim' in 9 | # this container. 10 | mailhub=mailhog:1025 11 | 12 | # Where will the mail seem to come from? 13 | #rewriteDomain= 14 | 15 | # The full hostname 16 | #hostname= 17 | 18 | # Are users allowed to set their own From: address? (YES/NO) 19 | FromLineOverride=YES 20 | -------------------------------------------------------------------------------- /5.6-ldap/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 | -------------------------------------------------------------------------------- /5.6-ldap/docker-php-pecl-install: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | usage() { 5 | echo "usage: $0 [channel/] ..." 6 | echo " ie: $0 uploadprogress oauth-1.2.3" 7 | } 8 | 9 | if [ $# -eq 0 ]; then 10 | usage >&2 11 | exit 1 12 | fi 13 | 14 | pecl install "$@" 15 | 16 | while [ $# -gt 0 ]; do 17 | ext="$1" 18 | ext=$(echo "$ext" | cut -d- -f1) 19 | ext=$(echo "$ext" | cut -d\/ -f2) 20 | shift 21 | 22 | for module in $(find /usr/local/lib/php/extensions -name "$ext.so"); do 23 | ini="/usr/local/etc/php/conf.d/docker-php-pecl-$ext.ini" 24 | if grep -q zend_extension_entry "$module"; then 25 | # https://wiki.php.net/internals/extensions#loading_zend_extensions 26 | line="zend_extension=$(basename "$module")" 27 | else 28 | line="extension=$(basename "$module")" 29 | fi 30 | if ! grep -q "$line" "$ini" 2>/dev/null; then 31 | echo "$line" >> "$ini" 32 | fi 33 | done 34 | done 35 | 36 | rm -rf /tmp/* 37 | -------------------------------------------------------------------------------- /5.6-smtp/Dockerfile: -------------------------------------------------------------------------------- 1 | # Pull base image. 2 | FROM php:5.6-apache 3 | COPY config/php.ini /usr/local/etc/php/ 4 | 5 | # ADD BASHRC CONFIG 6 | COPY config/bashrc /root/ 7 | RUN mv /root/bashrc /root/.bashrc 8 | 9 | RUN apt-get clean && apt-get update && apt-get install -y --fix-missing \ 10 | ruby-dev \ 11 | rubygems \ 12 | imagemagick \ 13 | graphviz \ 14 | sudo \ 15 | git \ 16 | vim \ 17 | memcached \ 18 | libmemcached-tools \ 19 | libpng-dev \ 20 | libjpeg62-turbo-dev \ 21 | libmcrypt-dev \ 22 | libxml2-dev \ 23 | libxslt1-dev \ 24 | mysql-client \ 25 | zip \ 26 | wget \ 27 | linux-libc-dev \ 28 | libyaml-dev \ 29 | apt-transport-https \ 30 | zlib1g-dev \ 31 | libicu-dev \ 32 | gnupg2 \ 33 | libssl-dev \ 34 | libpq-dev 35 | 36 | # postgresql-client-9.5 37 | RUN wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - && echo "deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main" >> /etc/apt/sources.list && apt-get update && apt-get install -y postgresql-client-9.5 38 | 39 | # Install PECL packages 40 | COPY docker-php-pecl-install /usr/local/bin/ 41 | RUN chmod +x /usr/local/bin/docker-php-pecl-install 42 | RUN docker-php-pecl-install \ 43 | uploadprogress-1.0.3.1 \ 44 | memcache-3.0.8 \ 45 | yaml-1.2.0 \ 46 | mongo-1.6.12 47 | 48 | COPY docker-php-ext-install /usr/local/bin/ 49 | RUN chmod +x /usr/local/bin/docker-php-ext-install 50 | RUN docker-php-ext-configure gd --with-jpeg-dir=/usr/include/ \ 51 | && docker-php-ext-install \ 52 | gd \ 53 | mbstring \ 54 | mcrypt \ 55 | zip \ 56 | soap \ 57 | mysql \ 58 | pdo_mysql \ 59 | mysqli \ 60 | xsl \ 61 | opcache \ 62 | calendar \ 63 | intl \ 64 | exif \ 65 | pgsql \ 66 | pdo_pgsql \ 67 | ftp 68 | 69 | # Installation node.js 70 | RUN curl -sL https://deb.nodesource.com/setup_8.x | sudo bash - 71 | RUN apt-get install -y nodejs build-essential ;\ 72 | # Installation of LESS 73 | npm update -g npm && \ 74 | npm install -g less && npm install -g less-plugin-clean-css; \ 75 | # Installation of Grunt 76 | npm install -g grunt-cli; \ 77 | # Installation of Gulp 78 | npm install -g gulp; \ 79 | # Installation of Composer 80 | cd /usr/src && curl -sS http://getcomposer.org/installer | php; \ 81 | cd /usr/src && mv composer.phar /usr/bin/composer; \ 82 | # Installation of drush 83 | git clone https://github.com/drush-ops/drush.git /usr/local/src/drush; \ 84 | cd /usr/local/src/drush && git checkout 8.1.2; \ 85 | ln -s /usr/local/src/drush/drush /usr/bin/drush; \ 86 | cd /usr/local/src/drush && composer update && composer install; \ 87 | # Add drush components 88 | mkdir /var/www/.drush; \ 89 | cd /var/www/.drush && wget https://ftp.drupal.org/files/projects/registry_rebuild-7.x-2.3.zip && unzip registry_rebuild-7.x-2.3.zip; \ 90 | cd /var/www/.drush && wget https://ftp.drupal.org/files/projects/site_audit-7.x-1.15.zip && unzip site_audit-7.x-1.15.zip; \ 91 | cd /var/www/.drush && rm *.zip; \ 92 | chown -R www-data:www-data /var/www; \ 93 | sudo -u www-data drush cc drush; \ 94 | # Installation of PHP_CodeSniffer with Drupal coding standards. 95 | # See https://www.drupal.org/node/1419988#coder-composer 96 | composer global require drupal/coder; \ 97 | ln -s ~/.composer/vendor/bin/phpcs /usr/local/bin; \ 98 | ln -s ~/.composer/vendor/bin/phpcbf /usr/local/bin; \ 99 | phpcs --config-set installed_paths ~/.composer/vendor/drupal/coder/coder_sniffer 100 | 101 | RUN rm -rf /var/www/html && \ 102 | mkdir -p /var/lock/apache2 /var/run/apache2 /var/log/apache2 /var/www/html && \ 103 | chown -R www-data:www-data /var/lock/apache2 /var/run/apache2 /var/log/apache2 /var/www/html 104 | 105 | # install msmtp 106 | RUN set -x \ 107 | && DEBIAN_FRONTEND=noninteractive \ 108 | && apt-get update && apt-get install -y --no-install-recommends msmtp && rm -r /var/lib/apt/lists/* 109 | ADD core/msmtprc.conf /usr/local/etc/msmtprc 110 | ADD core/php-smtp.ini /usr/local/etc/php/conf.d/php-smtp.ini 111 | 112 | COPY config/apache2.conf /etc/apache2 113 | COPY core/envvars /etc/apache2 114 | COPY core/other-vhosts-access-log.conf /etc/apache2/conf-enabled/ 115 | RUN rm /etc/apache2/sites-enabled/000-default.conf 116 | RUN chown -R www-data:www-data /var/www 117 | 118 | # Installation of Opcode cache 119 | RUN ( \ 120 | echo "opcache.memory_consumption=128"; \ 121 | echo "opcache.interned_strings_buffer=8"; \ 122 | echo "opcache.max_accelerated_files=4000"; \ 123 | echo "opcache.revalidate_freq=5"; \ 124 | echo "opcache.fast_shutdown=1"; \ 125 | echo "opcache.enable_cli=1"; \ 126 | ) > /usr/local/etc/php/conf.d/opcache-recommended.ini 127 | 128 | RUN a2enmod rewrite expires && service apache2 restart 129 | 130 | # install phing 131 | RUN pear channel-discover pear.phing.info && pear install [--alldeps] phing/phing 132 | 133 | # install phpcpd 134 | RUN wget https://phar.phpunit.de/phpcpd.phar && chmod +x phpcpd.phar && mv phpcpd.phar /usr/local/bin/phpcpd 135 | 136 | # install phpmetrics 137 | RUN wget https://github.com/phpmetrics/PhpMetrics/raw/master/build/phpmetrics.phar && chmod +x phpmetrics.phar && mv phpmetrics.phar /usr/local/bin/phpmetrics 138 | 139 | # Install Drupal Console for Drupal 8 140 | RUN curl https://drupalconsole.com/installer -L -o drupal.phar && mv drupal.phar /usr/local/bin/drupal && chmod +x /usr/local/bin/drupal 141 | 142 | # Our apache volume 143 | VOLUME /var/www/html 144 | 145 | # create directory for ssh keys 146 | RUN mkdir /var/www/.ssh/ 147 | RUN chown -R www-data:www-data /var/www/ 148 | RUN chmod -R 600 /var/www/.ssh/ 149 | 150 | # Set timezone to Europe/Paris 151 | RUN echo "Europe/Paris" > /etc/timezone && dpkg-reconfigure -f noninteractive tzdata 152 | 153 | # Expose 80 for apache, 9000 for xdebug 154 | EXPOSE 80 9000 155 | 156 | # Set a custom entrypoint. 157 | COPY core/docker-entrypoint.sh / 158 | RUN chmod +x /docker-entrypoint.sh 159 | ENTRYPOINT ["/docker-entrypoint.sh"] 160 | -------------------------------------------------------------------------------- /5.6-smtp/config/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 | 39 | ServerName MYSERVERNAME 40 | ServerAlias MYSERVERALIAS 41 | DocumentRoot "/var/www/html/MYDOCUMENTROOT" 42 | 43 | Options Indexes FollowSymLinks MultiViews 44 | AllowOverride All 45 | Order allow,deny 46 | Allow from all 47 | 48 | #ErrorLog /var/log/apache2/error.log 49 | #LogLevel error 50 | SetEnvIf Remote_Addr "127\.0\.0\.1" loopback 51 | #CustomLog /var/log/apache2/access.log combined env=!loopback 52 | ServerSignature On 53 | 54 | 55 | AccessFileName .htaccess 56 | 57 | Require all denied 58 | 59 | 60 | LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined 61 | LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined 62 | LogFormat "%h %l %u %t \"%r\" %>s %O" common 63 | LogFormat "%{Referer}i -> %U" referer 64 | LogFormat "%{User-agent}i" agent 65 | 66 | CustomLog /proc/self/fd/1 combined 67 | 68 | 69 | SetHandler application/x-httpd-php 70 | 71 | 72 | # Multiple DirectoryIndex directives within the same context will add 73 | # to the list of resources to look for rather than replace 74 | # https://httpd.apache.org/docs/current/mod/mod_dir.html#directoryindex 75 | DirectoryIndex disabled 76 | DirectoryIndex index.php index.html 77 | 78 | IncludeOptional conf-enabled/*.conf 79 | IncludeOptional sites-enabled/*.conf 80 | -------------------------------------------------------------------------------- /5.6-smtp/config/bashrc: -------------------------------------------------------------------------------- 1 | alias ll='ls -al' 2 | alias drush='sudo -u www-data drush' 3 | alias git='sudo -u www-data git' 4 | alias ssh='sudo -u www-data ssh' 5 | alias drupal='sudo -u www-data drupal' 6 | 7 | alias drupalcs="phpcs --standard=Drupal --extensions='php,module,inc,install,test,profile,theme,js,css,info,txt'" 8 | alias drupalbp="phpcs --standard=DrupalPractice --extensions=php,module,inc,install,test,profile,theme,js,css,info,txt,md" 9 | -------------------------------------------------------------------------------- /5.6-smtp/core/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | set -e 3 | 4 | # Configure msmtp 5 | sed -i "s/MY_SMTP/$SMTP/g" /usr/local/etc/msmtprc 6 | sed -i "s/MY_EMAIL_DOMAIN/$EMAIL_DOMAIN/g" /usr/local/etc/msmtprc 7 | sed -i "s/MY_OUTGOING_ADDRESS/$OUTGOING_ADDRESS/g" /usr/local/etc/msmtprc 8 | 9 | 10 | # set msmtp permissions 11 | chmod 600 /usr/local/etc/msmtprc && chown www-data /usr/local/etc/msmtprc 12 | 13 | # Set the apache user and group to match the host user. 14 | # This script will change the www-data UID/GID in the container from to 33 (default) to the UID/GID of the host user, if the current host user is not root. 15 | OWNER=$(stat -c '%u' /var/www/html) 16 | GROUP=$(stat -c '%g' /var/www/html) 17 | USERNAME=www-data 18 | [ -e "/etc/debian_version" ] || USERNAME=apache 19 | if [ "$OWNER" != "0" ]; then 20 | usermod -o -u $OWNER $USERNAME 21 | usermod -s /bin/bash $USERNAME 22 | groupmod -o -g $GROUP $USERNAME 23 | usermod -d /var/www/html $USERNAME 24 | chown -R --silent $USERNAME:$USERNAME /var/www/html 25 | fi 26 | echo The apache user and group has been set to the following: 27 | id $USERNAME 28 | 29 | usermod -d /var/www www-data 30 | 31 | # Apache2 custom servername, alias and documentroot 32 | sed -i "s/MYSERVERNAME/$SERVERNAME/g" /etc/apache2/apache2.conf 33 | sed -i "s/MYSERVERALIAS/$SERVERALIAS/g" /etc/apache2/apache2.conf 34 | sed -i "s/MYDOCUMENTROOT/$DOCUMENTROOT/g" /etc/apache2/apache2.conf 35 | 36 | # Apache gets grumpy about PID files pre-existing 37 | rm -f /var/run/apache2/apache2.pid 38 | 39 | # Start Apache in foreground 40 | /usr/sbin/apache2 -DFOREGROUND 41 | -------------------------------------------------------------------------------- /5.6-smtp/core/envvars: -------------------------------------------------------------------------------- 1 | # envvars - default environment variables for apache2ctl 2 | 3 | # this won't be correct after changing uid 4 | unset HOME 5 | 6 | # for supporting multiple apache2 instances 7 | if [ "${APACHE_CONFDIR##/etc/apache2-}" != "${APACHE_CONFDIR}" ] ; then 8 | SUFFIX="-${APACHE_CONFDIR##/etc/apache2-}" 9 | else 10 | SUFFIX= 11 | fi 12 | 13 | # Since there is no sane way to get the parsed apache2 config in scripts, some 14 | # settings are defined via environment variables and then used in apache2ctl, 15 | # /etc/init.d/apache2, /etc/logrotate.d/apache2, etc. 16 | export APACHE_RUN_USER=www-data 17 | export APACHE_RUN_GROUP=www-data 18 | # temporary state file location. This might be changed to /run in Wheezy+1 19 | export APACHE_PID_FILE=/var/run/apache2/apache2$SUFFIX.pid 20 | export APACHE_RUN_DIR=/var/run/apache2$SUFFIX 21 | export APACHE_LOCK_DIR=/var/lock/apache2$SUFFIX 22 | # Only /var/log/apache2 is handled by /etc/logrotate.d/apache2. 23 | export APACHE_LOG_DIR=/var/log/apache2$SUFFIX 24 | 25 | ## The locale used by some modules like mod_dav 26 | export LANG=C 27 | ## Uncomment the following line to use the system default locale instead: 28 | #. /etc/default/locale 29 | 30 | export LANG 31 | 32 | ## The command to get the status for 'apache2ctl status'. 33 | ## Some packages providing 'www-browser' need '--dump' instead of '-dump'. 34 | #export APACHE_LYNX='www-browser -dump' 35 | 36 | ## If you need a higher file descriptor limit, uncomment and adjust the 37 | ## following line (default is 8192): 38 | #APACHE_ULIMIT_MAX_FILES='ulimit -n 65536' 39 | 40 | ## If you would like to pass arguments to the web server, add them below 41 | ## to the APACHE_ARGUMENTS environment. 42 | #export APACHE_ARGUMENTS='' 43 | 44 | ## Enable the debug mode for maintainer scripts. 45 | ## This will produce a verbose output on package installations of web server modules and web application 46 | ## installations which interact with Apache 47 | #export APACHE2_MAINTSCRIPT_DEBUG=1 48 | -------------------------------------------------------------------------------- /5.6-smtp/core/memcached.conf: -------------------------------------------------------------------------------- 1 | # memcached default config file 2 | # 2003 - Jay Bonci 3 | # This configuration file is read by the start-memcached script provided as 4 | # part of the Debian GNU/Linux distribution. 5 | 6 | # Run memcached as a daemon. This command is implied, and is not needed for the 7 | # daemon to run. See the README.Debian that comes with this package for more 8 | # information. 9 | -d 10 | 11 | # Log memcached's output to /var/log/memcached 12 | logfile /var/log/memcached.log 13 | 14 | # Be verbose 15 | # -v 16 | 17 | # Be even more verbose (print client commands as well) 18 | # -vv 19 | 20 | # Start with a cap of 64 megs of memory. It's reasonable, and the daemon default 21 | # Note that the daemon will grow to this size, but does not start out holding this much 22 | # memory 23 | -m 64 24 | 25 | # Default connection port is 11211 26 | -p 11211 27 | 28 | # Run the daemon as root. The start-memcached will default to running as root if no 29 | # -u command is present in this config file 30 | -u memcache 31 | 32 | # Specify which IP address to listen on. The default is to listen on all IP addresses 33 | # This parameter is one of the only security measures that memcached has, so make sure 34 | # it's listening on a firewalled interface. 35 | -l memcache 36 | 37 | # Limit the number of simultaneous incoming connections. The daemon default is 1024 38 | # -c 1024 39 | 40 | # Lock down all paged memory. Consult with the README and homepage before you do this 41 | # -k 42 | 43 | # Return error when memory is exhausted (rather than removing items) 44 | # -M 45 | 46 | # Maximize core file limit 47 | # -r 48 | -------------------------------------------------------------------------------- /5.6-smtp/core/msmtprc.conf: -------------------------------------------------------------------------------- 1 | defaults 2 | tls off 3 | tls_certcheck off 4 | tls_starttls off 5 | 6 | account default 7 | host MY_SMTP 8 | port 25 9 | 10 | auto_from off 11 | from MY_OUTGOING_ADDRESS 12 | maildomain MY_EMAIL_DOMAIN -------------------------------------------------------------------------------- /5.6-smtp/core/other-vhosts-access-log.conf: -------------------------------------------------------------------------------- 1 | # Define an access log for VirtualHosts that don't define their own logfile 2 | #CustomLog ${APACHE_LOG_DIR}/other_vhosts_access.log vhost_combined 3 | 4 | # vim: syntax=apache ts=4 sw=4 sts=4 sr noet 5 | -------------------------------------------------------------------------------- /5.6-smtp/core/php-smtp.ini: -------------------------------------------------------------------------------- 1 | 2 | ; This ini file sets the php sendmail path to ssmtp. Nothing more. 3 | 4 | [mail function] 5 | sendmail_path = /usr/bin/msmtp -C /usr/local/etc/msmtprc -t 6 | -------------------------------------------------------------------------------- /5.6-smtp/core/ssmtp.conf: -------------------------------------------------------------------------------- 1 | # Configuartion file for sSMTP sendmail 2 | 3 | # The person who gets all mail for userids < 1000 4 | # Make this empty to disable rewriting. 5 | root= 6 | 7 | # We want to use this with an exim container. Link these 8 | # so that that container will be reachable as 'exim' in 9 | # this container. 10 | mailhub=mailhog:1025 11 | 12 | # Where will the mail seem to come from? 13 | #rewriteDomain= 14 | 15 | # The full hostname 16 | #hostname= 17 | 18 | # Are users allowed to set their own From: address? (YES/NO) 19 | FromLineOverride=YES 20 | -------------------------------------------------------------------------------- /5.6-smtp/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 | -------------------------------------------------------------------------------- /5.6-smtp/docker-php-pecl-install: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | usage() { 5 | echo "usage: $0 [channel/] ..." 6 | echo " ie: $0 uploadprogress oauth-1.2.3" 7 | } 8 | 9 | if [ $# -eq 0 ]; then 10 | usage >&2 11 | exit 1 12 | fi 13 | 14 | pecl install "$@" 15 | 16 | while [ $# -gt 0 ]; do 17 | ext="$1" 18 | ext=$(echo "$ext" | cut -d- -f1) 19 | ext=$(echo "$ext" | cut -d\/ -f2) 20 | shift 21 | 22 | for module in $(find /usr/local/lib/php/extensions -name "$ext.so"); do 23 | ini="/usr/local/etc/php/conf.d/docker-php-pecl-$ext.ini" 24 | if grep -q zend_extension_entry "$module"; then 25 | # https://wiki.php.net/internals/extensions#loading_zend_extensions 26 | line="zend_extension=$(basename "$module")" 27 | else 28 | line="extension=$(basename "$module")" 29 | fi 30 | if ! grep -q "$line" "$ini" 2>/dev/null; then 31 | echo "$line" >> "$ini" 32 | fi 33 | done 34 | done 35 | 36 | rm -rf /tmp/* 37 | -------------------------------------------------------------------------------- /5.6/config/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 | 39 | ServerName MYSERVERNAME 40 | ServerAlias MYSERVERALIAS 41 | DocumentRoot "/var/www/html/MYDOCUMENTROOT" 42 | 43 | Options Indexes FollowSymLinks MultiViews 44 | AllowOverride All 45 | Order allow,deny 46 | Allow from all 47 | 48 | #ErrorLog /var/log/apache2/error.log 49 | #LogLevel error 50 | SetEnvIf Remote_Addr "127\.0\.0\.1" loopback 51 | #CustomLog /var/log/apache2/access.log combined env=!loopback 52 | ServerSignature On 53 | 54 | 55 | AccessFileName .htaccess 56 | 57 | Require all denied 58 | 59 | 60 | LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined 61 | LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined 62 | LogFormat "%h %l %u %t \"%r\" %>s %O" common 63 | LogFormat "%{Referer}i -> %U" referer 64 | LogFormat "%{User-agent}i" agent 65 | 66 | CustomLog /proc/self/fd/1 combined 67 | 68 | 69 | SetHandler application/x-httpd-php 70 | 71 | 72 | # Multiple DirectoryIndex directives within the same context will add 73 | # to the list of resources to look for rather than replace 74 | # https://httpd.apache.org/docs/current/mod/mod_dir.html#directoryindex 75 | DirectoryIndex disabled 76 | DirectoryIndex index.php index.html 77 | 78 | IncludeOptional conf-enabled/*.conf 79 | IncludeOptional sites-enabled/*.conf 80 | -------------------------------------------------------------------------------- /5.6/config/bashrc: -------------------------------------------------------------------------------- 1 | alias ll='ls -al' 2 | alias drush='sudo -u www-data drush' 3 | alias git='sudo -u www-data git' 4 | alias ssh='sudo -u www-data ssh' 5 | alias drupal='sudo -u www-data drupal' 6 | 7 | alias drupalcs="phpcs --standard=Drupal --extensions='php,module,inc,install,test,profile,theme,js,css,info,txt'" 8 | alias drupalbp="phpcs --standard=DrupalPractice --extensions=php,module,inc,install,test,profile,theme,js,css,info,txt,md" 9 | -------------------------------------------------------------------------------- /5.6/core/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | set -e 3 | 4 | # Set the apache user and group to match the host user. 5 | # This script will change the www-data UID/GID in the container from to 33 (default) to the UID/GID of the host user, if the current host user is not root. 6 | OWNER=$(stat -c '%u' /var/www/html) 7 | GROUP=$(stat -c '%g' /var/www/html) 8 | USERNAME=www-data 9 | [ -e "/etc/debian_version" ] || USERNAME=apache 10 | if [ "$OWNER" != "0" ]; then 11 | usermod -o -u $OWNER $USERNAME 12 | usermod -s /bin/bash $USERNAME 13 | groupmod -o -g $GROUP $USERNAME 14 | usermod -d /var/www/html $USERNAME 15 | chown -R --silent $USERNAME:$USERNAME /var/www/html 16 | fi 17 | echo The apache user and group has been set to the following: 18 | id $USERNAME 19 | 20 | usermod -d /var/www www-data 21 | 22 | # Apache2 custom servername, alias and documentroot 23 | sed -i "s/MYSERVERNAME/$SERVERNAME/g" /etc/apache2/apache2.conf 24 | sed -i "s/MYSERVERALIAS/$SERVERALIAS/g" /etc/apache2/apache2.conf 25 | sed -i "s/MYDOCUMENTROOT/$DOCUMENTROOT/g" /etc/apache2/apache2.conf 26 | 27 | # Apache gets grumpy about PID files pre-existing 28 | rm -f /var/run/apache2/apache2.pid 29 | 30 | # Start Apache in foreground 31 | /usr/sbin/apache2 -DFOREGROUND 32 | -------------------------------------------------------------------------------- /5.6/core/envvars: -------------------------------------------------------------------------------- 1 | # envvars - default environment variables for apache2ctl 2 | 3 | # this won't be correct after changing uid 4 | unset HOME 5 | 6 | # for supporting multiple apache2 instances 7 | if [ "${APACHE_CONFDIR##/etc/apache2-}" != "${APACHE_CONFDIR}" ] ; then 8 | SUFFIX="-${APACHE_CONFDIR##/etc/apache2-}" 9 | else 10 | SUFFIX= 11 | fi 12 | 13 | # Since there is no sane way to get the parsed apache2 config in scripts, some 14 | # settings are defined via environment variables and then used in apache2ctl, 15 | # /etc/init.d/apache2, /etc/logrotate.d/apache2, etc. 16 | export APACHE_RUN_USER=www-data 17 | export APACHE_RUN_GROUP=www-data 18 | # temporary state file location. This might be changed to /run in Wheezy+1 19 | export APACHE_PID_FILE=/var/run/apache2/apache2$SUFFIX.pid 20 | export APACHE_RUN_DIR=/var/run/apache2$SUFFIX 21 | export APACHE_LOCK_DIR=/var/lock/apache2$SUFFIX 22 | # Only /var/log/apache2 is handled by /etc/logrotate.d/apache2. 23 | export APACHE_LOG_DIR=/var/log/apache2$SUFFIX 24 | 25 | ## The locale used by some modules like mod_dav 26 | export LANG=C 27 | ## Uncomment the following line to use the system default locale instead: 28 | #. /etc/default/locale 29 | 30 | export LANG 31 | 32 | ## The command to get the status for 'apache2ctl status'. 33 | ## Some packages providing 'www-browser' need '--dump' instead of '-dump'. 34 | #export APACHE_LYNX='www-browser -dump' 35 | 36 | ## If you need a higher file descriptor limit, uncomment and adjust the 37 | ## following line (default is 8192): 38 | #APACHE_ULIMIT_MAX_FILES='ulimit -n 65536' 39 | 40 | ## If you would like to pass arguments to the web server, add them below 41 | ## to the APACHE_ARGUMENTS environment. 42 | #export APACHE_ARGUMENTS='' 43 | 44 | ## Enable the debug mode for maintainer scripts. 45 | ## This will produce a verbose output on package installations of web server modules and web application 46 | ## installations which interact with Apache 47 | #export APACHE2_MAINTSCRIPT_DEBUG=1 48 | -------------------------------------------------------------------------------- /5.6/core/memcached.conf: -------------------------------------------------------------------------------- 1 | # memcached default config file 2 | # 2003 - Jay Bonci 3 | # This configuration file is read by the start-memcached script provided as 4 | # part of the Debian GNU/Linux distribution. 5 | 6 | # Run memcached as a daemon. This command is implied, and is not needed for the 7 | # daemon to run. See the README.Debian that comes with this package for more 8 | # information. 9 | -d 10 | 11 | # Log memcached's output to /var/log/memcached 12 | logfile /var/log/memcached.log 13 | 14 | # Be verbose 15 | # -v 16 | 17 | # Be even more verbose (print client commands as well) 18 | # -vv 19 | 20 | # Start with a cap of 64 megs of memory. It's reasonable, and the daemon default 21 | # Note that the daemon will grow to this size, but does not start out holding this much 22 | # memory 23 | -m 64 24 | 25 | # Default connection port is 11211 26 | -p 11211 27 | 28 | # Run the daemon as root. The start-memcached will default to running as root if no 29 | # -u command is present in this config file 30 | -u memcache 31 | 32 | # Specify which IP address to listen on. The default is to listen on all IP addresses 33 | # This parameter is one of the only security measures that memcached has, so make sure 34 | # it's listening on a firewalled interface. 35 | -l memcache 36 | 37 | # Limit the number of simultaneous incoming connections. The daemon default is 1024 38 | # -c 1024 39 | 40 | # Lock down all paged memory. Consult with the README and homepage before you do this 41 | # -k 42 | 43 | # Return error when memory is exhausted (rather than removing items) 44 | # -M 45 | 46 | # Maximize core file limit 47 | # -r 48 | -------------------------------------------------------------------------------- /5.6/core/other-vhosts-access-log.conf: -------------------------------------------------------------------------------- 1 | # Define an access log for VirtualHosts that don't define their own logfile 2 | #CustomLog ${APACHE_LOG_DIR}/other_vhosts_access.log vhost_combined 3 | 4 | # vim: syntax=apache ts=4 sw=4 sts=4 sr noet 5 | -------------------------------------------------------------------------------- /5.6/core/php-smtp.ini: -------------------------------------------------------------------------------- 1 | ; This ini file sets the php sendmail path to ssmtp. Nothing more. 2 | 3 | [mail function] 4 | sendmail_path = /usr/sbin/ssmtp -t 5 | -------------------------------------------------------------------------------- /5.6/core/ssmtp.conf: -------------------------------------------------------------------------------- 1 | # Configuartion file for sSMTP sendmail 2 | 3 | # The person who gets all mail for userids < 1000 4 | # Make this empty to disable rewriting. 5 | root= 6 | 7 | # We want to use this with an exim container. Link these 8 | # so that that container will be reachable as 'exim' in 9 | # this container. 10 | mailhub=mailhog:1025 11 | 12 | # Where will the mail seem to come from? 13 | #rewriteDomain= 14 | 15 | # The full hostname 16 | #hostname= 17 | 18 | # Are users allowed to set their own From: address? (YES/NO) 19 | FromLineOverride=YES 20 | -------------------------------------------------------------------------------- /5.6/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 | -------------------------------------------------------------------------------- /5.6/docker-php-pecl-install: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | usage() { 5 | echo "usage: $0 [channel/] ..." 6 | echo " ie: $0 uploadprogress oauth-1.2.3" 7 | } 8 | 9 | if [ $# -eq 0 ]; then 10 | usage >&2 11 | exit 1 12 | fi 13 | 14 | pecl install "$@" 15 | 16 | while [ $# -gt 0 ]; do 17 | ext="$1" 18 | ext=$(echo "$ext" | cut -d- -f1) 19 | ext=$(echo "$ext" | cut -d\/ -f2) 20 | shift 21 | 22 | for module in $(find /usr/local/lib/php/extensions -name "$ext.so"); do 23 | ini="/usr/local/etc/php/conf.d/docker-php-pecl-$ext.ini" 24 | if grep -q zend_extension_entry "$module"; then 25 | # https://wiki.php.net/internals/extensions#loading_zend_extensions 26 | line="zend_extension=$(basename "$module")" 27 | else 28 | line="extension=$(basename "$module")" 29 | fi 30 | if ! grep -q "$line" "$ini" 2>/dev/null; then 31 | echo "$line" >> "$ini" 32 | fi 33 | done 34 | done 35 | 36 | rm -rf /tmp/* 37 | -------------------------------------------------------------------------------- /7.0-dev/config/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 web 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 | SSLProtocol all -SSLv3 -TLSv1 -TLSv1.1 23 | SSLCipherSuite ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256 24 | 25 | 26 | Listen 443 27 | 28 | 29 | 30 | Options FollowSymLinks 31 | AllowOverride None 32 | Require all denied 33 | 34 | 35 | 36 | AllowOverride All 37 | Require all granted 38 | 39 | 40 | 41 | ServerName MYSERVERNAME 42 | ServerAlias MYSERVERALIAS 43 | DocumentRoot "/var/www/html/MYDOCUMENTROOT" 44 | 45 | Options Indexes FollowSymLinks MultiViews 46 | AllowOverride All 47 | Order allow,deny 48 | Allow from all 49 | 50 | #ErrorLog /var/log/apache2/error.log 51 | #LogLevel error 52 | SetEnvIf Remote_Addr "127\.0\.0\.1" loopback 53 | #CustomLog /var/log/apache2/access.log combined env=!loopback 54 | ServerSignature On 55 | 56 | 57 | AccessFileName .htaccess 58 | 59 | Require all denied 60 | 61 | 62 | LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined 63 | LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined 64 | LogFormat "%h %l %u %t \"%r\" %>s %O" common 65 | LogFormat "%{Referer}i -> %U" referer 66 | LogFormat "%{User-agent}i" agent 67 | 68 | CustomLog /proc/self/fd/1 combined 69 | 70 | 71 | SetHandler application/x-httpd-php 72 | 73 | 74 | # Multiple DirectoryIndex directives within the same context will add 75 | # to the list of resources to look for rather than replace 76 | # https://httpd.apache.org/docs/current/mod/mod_dir.html#directoryindex 77 | DirectoryIndex disabled 78 | DirectoryIndex index.php index.html 79 | 80 | IncludeOptional conf-enabled/*.conf 81 | IncludeOptional sites-enabled/*.conf 82 | -------------------------------------------------------------------------------- /7.0-dev/core/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | set -e 3 | 4 | # Apache2 custom servername, alias and documentroot 5 | sed -i "s/MYSERVERNAME/$SERVERNAME/g" /etc/apache2/apache2.conf 6 | sed -i "s/MYSERVERALIAS/$SERVERALIAS/g" /etc/apache2/apache2.conf 7 | sed -i "s/MYDOCUMENTROOT/$DOCUMENTROOT/g" /etc/apache2/apache2.conf 8 | 9 | # Set the apache user and group to match the host user. 10 | # This script will change the web UID/GID in the container from to 999 (default) to the UID/GID of the host user, if the current host user is not root. 11 | OWNER=$(stat -c '%u' /var/www/html) 12 | GROUP=$(stat -c '%g' /var/www/html) 13 | USERNAME=web 14 | [ -e "/etc/debian_version" ] || USERNAME=apache 15 | if [ "$OWNER" != "0" ]; then 16 | usermod -o -u $OWNER $USERNAME 17 | groupmod -o -g $GROUP www-data 18 | chown -R --silent $USERNAME:www-data /var/www 19 | fi 20 | 21 | # Apache gets grumpy about PID files pre-existing 22 | rm -f /var/run/apache2/apache2.pid 23 | 24 | # Start Apache in foreground 25 | /usr/sbin/apache2 -DFOREGROUND 26 | -------------------------------------------------------------------------------- /7.0-dev/core/envvars: -------------------------------------------------------------------------------- 1 | # envvars - default environment variables for apache2ctl 2 | 3 | # this won't be correct after changing uid 4 | unset HOME 5 | 6 | # for supporting multiple apache2 instances 7 | if [ "${APACHE_CONFDIR##/etc/apache2-}" != "${APACHE_CONFDIR}" ] ; then 8 | SUFFIX="-${APACHE_CONFDIR##/etc/apache2-}" 9 | else 10 | SUFFIX= 11 | fi 12 | 13 | # Since there is no sane way to get the parsed apache2 config in scripts, some 14 | # settings are defined via environment variables and then used in apache2ctl, 15 | # /etc/init.d/apache2, /etc/logrotate.d/apache2, etc. 16 | export APACHE_RUN_USER=web 17 | export APACHE_RUN_GROUP=www-data 18 | # temporary state file location. This might be changed to /run in Wheezy+1 19 | export APACHE_PID_FILE=/var/run/apache2/apache2$SUFFIX.pid 20 | export APACHE_RUN_DIR=/var/run/apache2$SUFFIX 21 | export APACHE_LOCK_DIR=/var/lock/apache2$SUFFIX 22 | # Only /var/log/apache2 is handled by /etc/logrotate.d/apache2. 23 | export APACHE_LOG_DIR=/var/log/apache2$SUFFIX 24 | 25 | ## The locale used by some modules like mod_dav 26 | export LANG=C 27 | ## Uncomment the following line to use the system default locale instead: 28 | #. /etc/default/locale 29 | 30 | export LANG 31 | 32 | ## The command to get the status for 'apache2ctl status'. 33 | ## Some packages providing 'www-browser' need '--dump' instead of '-dump'. 34 | #export APACHE_LYNX='www-browser -dump' 35 | 36 | ## If you need a higher file descriptor limit, uncomment and adjust the 37 | ## following line (default is 8192): 38 | #APACHE_ULIMIT_MAX_FILES='ulimit -n 65536' 39 | 40 | ## If you would like to pass arguments to the web server, add them below 41 | ## to the APACHE_ARGUMENTS environment. 42 | #export APACHE_ARGUMENTS='' 43 | 44 | ## Enable the debug mode for maintainer scripts. 45 | ## This will produce a verbose output on package installations of web server modules and web application 46 | ## installations which interact with Apache 47 | #export APACHE2_MAINTSCRIPT_DEBUG=1 48 | -------------------------------------------------------------------------------- /7.0-dev/core/memcached.conf: -------------------------------------------------------------------------------- 1 | # memcached default config file 2 | # 2003 - Jay Bonci 3 | # This configuration file is read by the start-memcached script provided as 4 | # part of the Debian GNU/Linux distribution. 5 | 6 | # Run memcached as a daemon. This command is implied, and is not needed for the 7 | # daemon to run. See the README.Debian that comes with this package for more 8 | # information. 9 | -d 10 | 11 | # Log memcached's output to /var/log/memcached 12 | logfile /var/log/memcached.log 13 | 14 | # Be verbose 15 | # -v 16 | 17 | # Be even more verbose (print client commands as well) 18 | # -vv 19 | 20 | # Start with a cap of 64 megs of memory. It's reasonable, and the daemon default 21 | # Note that the daemon will grow to this size, but does not start out holding this much 22 | # memory 23 | -m 64 24 | 25 | # Default connection port is 11211 26 | -p 11211 27 | 28 | # Run the daemon as root. The start-memcached will default to running as root if no 29 | # -u command is present in this config file 30 | -u memcache 31 | 32 | # Specify which IP address to listen on. The default is to listen on all IP addresses 33 | # This parameter is one of the only security measures that memcached has, so make sure 34 | # it's listening on a firewalled interface. 35 | -l memcache 36 | 37 | # Limit the number of simultaneous incoming connections. The daemon default is 1024 38 | # -c 1024 39 | 40 | # Lock down all paged memory. Consult with the README and homepage before you do this 41 | # -k 42 | 43 | # Return error when memory is exhausted (rather than removing items) 44 | # -M 45 | 46 | # Maximize core file limit 47 | # -r 48 | -------------------------------------------------------------------------------- /7.0-dev/core/other-vhosts-access-log.conf: -------------------------------------------------------------------------------- 1 | # Define an access log for VirtualHosts that don't define their own logfile 2 | #CustomLog ${APACHE_LOG_DIR}/other_vhosts_access.log vhost_combined 3 | 4 | # vim: syntax=apache ts=4 sw=4 sts=4 sr noet 5 | -------------------------------------------------------------------------------- /7.0-dev/core/php-smtp.ini: -------------------------------------------------------------------------------- 1 | ; This ini file sets the php sendmail path to ssmtp. Nothing more. 2 | 3 | [mail function] 4 | sendmail_path = /usr/sbin/ssmtp -t 5 | -------------------------------------------------------------------------------- /7.0-dev/core/ssmtp.conf: -------------------------------------------------------------------------------- 1 | # Configuartion file for sSMTP sendmail 2 | 3 | # The person who gets all mail for userids < 1000 4 | # Make this empty to disable rewriting. 5 | root= 6 | 7 | # We want to use this with an exim container. Link these 8 | # so that that container will be reachable as 'exim' in 9 | # this container. 10 | mailhub=mailhog:1025 11 | 12 | # Where will the mail seem to come from? 13 | #rewriteDomain= 14 | 15 | # The full hostname 16 | #hostname= 17 | 18 | # Are users allowed to set their own From: address? (YES/NO) 19 | FromLineOverride=YES 20 | -------------------------------------------------------------------------------- /7.0-dev/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 | -------------------------------------------------------------------------------- /7.0-dev/docker-php-pecl-install: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | usage() { 5 | echo "usage: $0 [channel/] ..." 6 | echo " ie: $0 uploadprogress oauth-1.2.3" 7 | } 8 | 9 | if [ $# -eq 0 ]; then 10 | usage >&2 11 | exit 1 12 | fi 13 | 14 | pecl install "$@" 15 | 16 | while [ $# -gt 0 ]; do 17 | ext="$1" 18 | ext=$(echo "$ext" | cut -d- -f1) 19 | ext=$(echo "$ext" | cut -d\/ -f2) 20 | shift 21 | 22 | for module in $(find /usr/local/lib/php/extensions -name "$ext.so"); do 23 | ini="/usr/local/etc/php/conf.d/docker-php-pecl-$ext.ini" 24 | if grep -q zend_extension_entry "$module"; then 25 | # https://wiki.php.net/internals/extensions#loading_zend_extensions 26 | line="zend_extension=$(basename "$module")" 27 | else 28 | line="extension=$(basename "$module")" 29 | fi 30 | if ! grep -q "$line" "$ini" 2>/dev/null; then 31 | echo "$line" >> "$ini" 32 | fi 33 | done 34 | done 35 | 36 | rm -rf /tmp/* 37 | -------------------------------------------------------------------------------- /7.0-wkhtmltopdf/Dockerfile: -------------------------------------------------------------------------------- 1 | # Pull base image. 2 | FROM actency/docker-apache-php:7.0-dev 3 | 4 | # Install WKHTMLTOPDF from sources 5 | RUN apt-get update && apt-get remove -y libqt4-dev qt4-dev-tools wkhtmltopdf && apt-get autoremove -y 6 | RUN apt-get install openssl build-essential libssl-dev libxrender-dev git-core libx11-dev libxext-dev libfontconfig1-dev libfreetype6-dev fontconfig -y 7 | RUN git clone git://github.com/wkhtmltopdf/wkhtmltopdf.git /var/wkhtmltopdf 8 | RUN mkdir /var/qt-wkhtmltopdf && cd /var/qt-wkhtmltopdf && git clone https://www.github.com/wkhtmltopdf/qt --depth 1 --branch wk_4.8.7 --single-branch . 9 | RUN cd /var/qt-wkhtmltopdf && echo "yes" | ./configure -nomake tools,examples,demos,docs,translations -opensource -prefix "`pwd`" `cat ../wkhtmltopdf/static_qt_conf_base ../wkhtmltopdf/static_qt_conf_linux | sed -re '/^#/ d' | tr '\n' ' '` && make -j3 && make install 10 | RUN cd /var/wkhtmltopdf && ../qt-wkhtmltopdf/bin/qmake && make -j3 && make install 11 | RUN chown -R web:www-data /var/qt-wkhtmltopdf/ && chown -R web:www-data /var/wkhtmltopdf 12 | 13 | # Expose 80 for apache, 9000 for xdebug 14 | EXPOSE 80 9000 15 | 16 | # Set and run a custom entrypoint 17 | COPY core/docker-entrypoint.sh / 18 | RUN chmod 777 /docker-entrypoint.sh && chmod +x /docker-entrypoint.sh 19 | ENTRYPOINT ["/docker-entrypoint.sh"] 20 | -------------------------------------------------------------------------------- /7.0-wkhtmltopdf/README.md: -------------------------------------------------------------------------------- 1 | # About this image 2 | 3 | This image is not part of the automated build because of the limitations on docker hub. 4 | The compilation time of wkhtmltopdf takes more than 2 hours on docker hub, and results in a timeout. 5 | 6 | This Dockerfile is used to build the image locally, and then push it to [Docker Hub](https://hub.docker.com/r/actency/docker-apache-php7-wkhtmltopdf/). 7 | 8 | The image contains: 9 | 10 | - Everything in the 7.0-dev tag 11 | - wkhtmltopdf and wkhtmltoimage installed from sources 12 | -------------------------------------------------------------------------------- /7.0-wkhtmltopdf/core/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | set -e 3 | 4 | # Apache2 custom servername, alias and documentroot 5 | sed -i "s/MYSERVERNAME/$SERVERNAME/g" /etc/apache2/apache2.conf 6 | sed -i "s/MYSERVERALIAS/$SERVERALIAS/g" /etc/apache2/apache2.conf 7 | sed -i "s/MYDOCUMENTROOT/$DOCUMENTROOT/g" /etc/apache2/apache2.conf 8 | 9 | # Set the apache user and group to match the host user. 10 | # This script will change the web UID/GID in the container from to 999 (default) to the UID/GID of the host user, if the current host user is not root. 11 | OWNER=$(stat -c '%u' /var/www/html) 12 | GROUP=$(stat -c '%g' /var/www/html) 13 | USERNAME=web 14 | [ -e "/etc/debian_version" ] || USERNAME=apache 15 | if [ "$OWNER" != "0" ]; then 16 | usermod -o -u $OWNER $USERNAME 17 | groupmod -o -g $GROUP www-data 18 | chown -R --silent $USERNAME:www-data /var/www 19 | fi 20 | 21 | # Apache gets grumpy about PID files pre-existing 22 | rm -f /var/run/apache2/apache2.pid 23 | 24 | # Start Apache in foreground 25 | /usr/sbin/apache2 -DFOREGROUND 26 | -------------------------------------------------------------------------------- /7.0/config/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 | SSLProtocol all -SSLv3 -TLSv1 -TLSv1.1 23 | SSLCipherSuite ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256 24 | 25 | 26 | 27 | Options FollowSymLinks 28 | AllowOverride None 29 | Require all denied 30 | 31 | 32 | 33 | AllowOverride All 34 | Require all granted 35 | 36 | 37 | 38 | ServerName MYSERVERNAME 39 | ServerAlias MYSERVERALIAS 40 | DocumentRoot "/var/www/html/MYDOCUMENTROOT" 41 | 42 | Options Indexes FollowSymLinks MultiViews 43 | AllowOverride All 44 | Order allow,deny 45 | Allow from all 46 | 47 | #ErrorLog /var/log/apache2/error.log 48 | #LogLevel error 49 | SetEnvIf Remote_Addr "127\.0\.0\.1" loopback 50 | #CustomLog /var/log/apache2/access.log combined env=!loopback 51 | ServerSignature On 52 | 53 | 54 | AccessFileName .htaccess 55 | 56 | Require all denied 57 | 58 | 59 | LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined 60 | LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined 61 | LogFormat "%h %l %u %t \"%r\" %>s %O" common 62 | LogFormat "%{Referer}i -> %U" referer 63 | LogFormat "%{User-agent}i" agent 64 | 65 | CustomLog /proc/self/fd/1 combined 66 | 67 | 68 | SetHandler application/x-httpd-php 69 | 70 | 71 | # Multiple DirectoryIndex directives within the same context will add 72 | # to the list of resources to look for rather than replace 73 | # https://httpd.apache.org/docs/current/mod/mod_dir.html#directoryindex 74 | DirectoryIndex disabled 75 | DirectoryIndex index.php index.html 76 | 77 | IncludeOptional conf-enabled/*.conf 78 | IncludeOptional sites-enabled/*.conf 79 | -------------------------------------------------------------------------------- /7.0/config/bashrc: -------------------------------------------------------------------------------- 1 | # Use bash-completion, if available 2 | [[ $PS1 && -f /usr/share/bash-completion/bash_completion ]] && \ 3 | . /usr/share/bash-completion/bash_completion 4 | 5 | alias ll='ls -al' 6 | alias drush='sudo -u www-data drush' 7 | alias git='sudo -u www-data git' 8 | alias wget='sudo -u www-data wget' 9 | alias ssh='sudo -u www-data ssh' 10 | alias drupal='sudo -u www-data drupal' 11 | alias php='sudo -u www-data php' 12 | alias composer='sudo -u www-data composer' 13 | alias gulp='sudo -u www-data gulp' 14 | alias bower='sudo -u www-data bower' 15 | -------------------------------------------------------------------------------- /7.0/core/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | set -e 3 | 4 | # Set the apache user and group to match the host user. 5 | # This script will change the www-data UID/GID in the container from to 33 (default) to the UID/GID of the host user, if the current host user is not root. 6 | OWNER=$(stat -c '%u' /var/www/html) 7 | GROUP=$(stat -c '%g' /var/www/html) 8 | USERNAME=www-data 9 | [ -e "/etc/debian_version" ] || USERNAME=apache 10 | if [ "$OWNER" != "0" ]; then 11 | usermod -o -u $OWNER $USERNAME 12 | usermod -s /bin/bash $USERNAME 13 | groupmod -o -g $GROUP $USERNAME 14 | usermod -d /var/www/html $USERNAME 15 | chown -R --silent $USERNAME:$USERNAME /var/www/html 16 | fi 17 | echo The apache user and group has been set to the following: 18 | id $USERNAME 19 | 20 | usermod -d /var/www www-data 21 | 22 | # Apache2 custom servername, alias and documentroot 23 | sed -i "s/MYSERVERNAME/$SERVERNAME/g" /etc/apache2/apache2.conf 24 | sed -i "s/MYSERVERALIAS/$SERVERALIAS/g" /etc/apache2/apache2.conf 25 | sed -i "s/MYDOCUMENTROOT/$DOCUMENTROOT/g" /etc/apache2/apache2.conf 26 | 27 | # Apache gets grumpy about PID files pre-existing 28 | rm -f /var/run/apache2/apache2.pid 29 | 30 | # Start Apache in foreground 31 | /usr/sbin/apache2 -DFOREGROUND 32 | -------------------------------------------------------------------------------- /7.0/core/envvars: -------------------------------------------------------------------------------- 1 | # envvars - default environment variables for apache2ctl 2 | 3 | # this won't be correct after changing uid 4 | unset HOME 5 | 6 | # for supporting multiple apache2 instances 7 | if [ "${APACHE_CONFDIR##/etc/apache2-}" != "${APACHE_CONFDIR}" ] ; then 8 | SUFFIX="-${APACHE_CONFDIR##/etc/apache2-}" 9 | else 10 | SUFFIX= 11 | fi 12 | 13 | # Since there is no sane way to get the parsed apache2 config in scripts, some 14 | # settings are defined via environment variables and then used in apache2ctl, 15 | # /etc/init.d/apache2, /etc/logrotate.d/apache2, etc. 16 | export APACHE_RUN_USER=www-data 17 | export APACHE_RUN_GROUP=www-data 18 | # temporary state file location. This might be changed to /run in Wheezy+1 19 | export APACHE_PID_FILE=/var/run/apache2/apache2$SUFFIX.pid 20 | export APACHE_RUN_DIR=/var/run/apache2$SUFFIX 21 | export APACHE_LOCK_DIR=/var/lock/apache2$SUFFIX 22 | # Only /var/log/apache2 is handled by /etc/logrotate.d/apache2. 23 | export APACHE_LOG_DIR=/var/log/apache2$SUFFIX 24 | 25 | ## The locale used by some modules like mod_dav 26 | export LANG=C 27 | ## Uncomment the following line to use the system default locale instead: 28 | #. /etc/default/locale 29 | 30 | export LANG 31 | 32 | ## The command to get the status for 'apache2ctl status'. 33 | ## Some packages providing 'www-browser' need '--dump' instead of '-dump'. 34 | #export APACHE_LYNX='www-browser -dump' 35 | 36 | ## If you need a higher file descriptor limit, uncomment and adjust the 37 | ## following line (default is 8192): 38 | #APACHE_ULIMIT_MAX_FILES='ulimit -n 65536' 39 | 40 | ## If you would like to pass arguments to the web server, add them below 41 | ## to the APACHE_ARGUMENTS environment. 42 | #export APACHE_ARGUMENTS='' 43 | 44 | ## Enable the debug mode for maintainer scripts. 45 | ## This will produce a verbose output on package installations of web server modules and web application 46 | ## installations which interact with Apache 47 | #export APACHE2_MAINTSCRIPT_DEBUG=1 48 | -------------------------------------------------------------------------------- /7.0/core/memcached.conf: -------------------------------------------------------------------------------- 1 | # memcached default config file 2 | # 2003 - Jay Bonci 3 | # This configuration file is read by the start-memcached script provided as 4 | # part of the Debian GNU/Linux distribution. 5 | 6 | # Run memcached as a daemon. This command is implied, and is not needed for the 7 | # daemon to run. See the README.Debian that comes with this package for more 8 | # information. 9 | -d 10 | 11 | # Log memcached's output to /var/log/memcached 12 | logfile /var/log/memcached.log 13 | 14 | # Be verbose 15 | # -v 16 | 17 | # Be even more verbose (print client commands as well) 18 | # -vv 19 | 20 | # Start with a cap of 64 megs of memory. It's reasonable, and the daemon default 21 | # Note that the daemon will grow to this size, but does not start out holding this much 22 | # memory 23 | -m 64 24 | 25 | # Default connection port is 11211 26 | -p 11211 27 | 28 | # Run the daemon as root. The start-memcached will default to running as root if no 29 | # -u command is present in this config file 30 | -u memcache 31 | 32 | # Specify which IP address to listen on. The default is to listen on all IP addresses 33 | # This parameter is one of the only security measures that memcached has, so make sure 34 | # it's listening on a firewalled interface. 35 | -l memcache 36 | 37 | # Limit the number of simultaneous incoming connections. The daemon default is 1024 38 | # -c 1024 39 | 40 | # Lock down all paged memory. Consult with the README and homepage before you do this 41 | # -k 42 | 43 | # Return error when memory is exhausted (rather than removing items) 44 | # -M 45 | 46 | # Maximize core file limit 47 | # -r 48 | -------------------------------------------------------------------------------- /7.0/core/other-vhosts-access-log.conf: -------------------------------------------------------------------------------- 1 | # Define an access log for VirtualHosts that don't define their own logfile 2 | #CustomLog ${APACHE_LOG_DIR}/other_vhosts_access.log vhost_combined 3 | 4 | # vim: syntax=apache ts=4 sw=4 sts=4 sr noet 5 | -------------------------------------------------------------------------------- /7.0/core/php-smtp.ini: -------------------------------------------------------------------------------- 1 | ; This ini file sets the php sendmail path to ssmtp. Nothing more. 2 | 3 | [mail function] 4 | sendmail_path = /usr/sbin/ssmtp -t 5 | -------------------------------------------------------------------------------- /7.0/core/ssmtp.conf: -------------------------------------------------------------------------------- 1 | # Configuartion file for sSMTP sendmail 2 | 3 | # The person who gets all mail for userids < 1000 4 | # Make this empty to disable rewriting. 5 | root= 6 | 7 | # We want to use this with an exim container. Link these 8 | # so that that container will be reachable as 'exim' in 9 | # this container. 10 | mailhub=mailhog:1025 11 | 12 | # Where will the mail seem to come from? 13 | #rewriteDomain= 14 | 15 | # The full hostname 16 | #hostname= 17 | 18 | # Are users allowed to set their own From: address? (YES/NO) 19 | FromLineOverride=YES 20 | -------------------------------------------------------------------------------- /7.0/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 | -------------------------------------------------------------------------------- /7.0/docker-php-pecl-install: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | usage() { 5 | echo "usage: $0 [channel/] ..." 6 | echo " ie: $0 uploadprogress oauth-1.2.3" 7 | } 8 | 9 | if [ $# -eq 0 ]; then 10 | usage >&2 11 | exit 1 12 | fi 13 | 14 | pecl install "$@" 15 | 16 | while [ $# -gt 0 ]; do 17 | ext="$1" 18 | ext=$(echo "$ext" | cut -d- -f1) 19 | ext=$(echo "$ext" | cut -d\/ -f2) 20 | shift 21 | 22 | for module in $(find /usr/local/lib/php/extensions -name "$ext.so"); do 23 | ini="/usr/local/etc/php/conf.d/docker-php-pecl-$ext.ini" 24 | if grep -q zend_extension_entry "$module"; then 25 | # https://wiki.php.net/internals/extensions#loading_zend_extensions 26 | line="zend_extension=$(basename "$module")" 27 | else 28 | line="extension=$(basename "$module")" 29 | fi 30 | if ! grep -q "$line" "$ini" 2>/dev/null; then 31 | echo "$line" >> "$ini" 32 | fi 33 | done 34 | done 35 | 36 | rm -rf /tmp/* 37 | -------------------------------------------------------------------------------- /7.1-0.1/config/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 | SSLProtocol all -SSLv3 -TLSv1 -TLSv1.1 23 | SSLCipherSuite ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256 24 | 25 | 26 | Listen 443 27 | 28 | 29 | 30 | Options FollowSymLinks 31 | AllowOverride None 32 | Require all denied 33 | 34 | 35 | 36 | AllowOverride All 37 | Require all granted 38 | 39 | 40 | 41 | ServerName MYSERVERNAME 42 | ServerAlias MYSERVERALIAS 43 | DocumentRoot "/var/www/html/MYDOCUMENTROOT" 44 | 45 | Options Indexes FollowSymLinks MultiViews 46 | AllowOverride All 47 | Order allow,deny 48 | Allow from all 49 | 50 | #ErrorLog /var/log/apache2/error.log 51 | #LogLevel error 52 | SetEnvIf Remote_Addr "127\.0\.0\.1" loopback 53 | #CustomLog /var/log/apache2/access.log combined env=!loopback 54 | ServerSignature On 55 | 56 | 57 | AccessFileName .htaccess 58 | 59 | Require all denied 60 | 61 | 62 | LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined 63 | LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined 64 | LogFormat "%h %l %u %t \"%r\" %>s %O" common 65 | LogFormat "%{Referer}i -> %U" referer 66 | LogFormat "%{User-agent}i" agent 67 | 68 | CustomLog /proc/self/fd/1 combined 69 | 70 | 71 | SetHandler application/x-httpd-php 72 | 73 | 74 | # Multiple DirectoryIndex directives within the same context will add 75 | # to the list of resources to look for rather than replace 76 | # https://httpd.apache.org/docs/current/mod/mod_dir.html#directoryindex 77 | DirectoryIndex disabled 78 | DirectoryIndex index.php index.html 79 | 80 | IncludeOptional conf-enabled/*.conf 81 | IncludeOptional sites-enabled/*.conf 82 | -------------------------------------------------------------------------------- /7.1-0.1/config/bashrc: -------------------------------------------------------------------------------- 1 | # Use bash-completion, if available 2 | [[ $PS1 && -f /usr/share/bash-completion/bash_completion ]] && \ 3 | . /usr/share/bash-completion/bash_completion 4 | 5 | alias ll='ls -al' 6 | 7 | function xdebug() { 8 | xdb_usage() { echo "usage xdebug: on|off" 1>&2; } 9 | 10 | case "$1" in 11 | on) 12 | sudo sed -i 's/^;*\(.*xdebug\.so\)/\1/' /usr/local/etc/php/php.ini 13 | sudo service apache2 reload > /dev/null 14 | echo "xdebug on"; 15 | ;; 16 | off) 17 | 18 | sudo sed -i 's/^\(.*xdebug\.so\)/;\1/' /usr/local/etc/php/php.ini 19 | sudo service apache2 reload > /dev/null 20 | echo "xdebug off"; 21 | ;; 22 | *) 23 | xdb_usage 24 | esac 25 | } 26 | -------------------------------------------------------------------------------- /7.1-0.1/core/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | set -e 3 | 4 | # Set the apache user and group to match the host user. 5 | # This script will change the www-data UID/GID in the container from to 33 (default) to the UID/GID of the host user, if the current host user is not root. 6 | OWNER=$(stat -c '%u' /var/www/html) 7 | GROUP=$(stat -c '%g' /var/www/html) 8 | USERNAME=www-data 9 | [ -e "/etc/debian_version" ] || USERNAME=apache 10 | if [ "$OWNER" != "0" ]; then 11 | usermod -o -u $OWNER $USERNAME 12 | usermod -s /bin/bash $USERNAME 13 | groupmod -o -g $GROUP $USERNAME 14 | usermod -d /var/www/html $USERNAME 15 | chown -R --silent $USERNAME:$USERNAME /var/www/html 16 | fi 17 | echo The apache user and group has been set to the following: 18 | id $USERNAME 19 | 20 | usermod -d /var/www www-data 21 | 22 | # Apache2 custom servername, alias and documentroot 23 | sed -i "s/MYSERVERNAME/$SERVERNAME/g" /etc/apache2/apache2.conf 24 | sed -i "s/MYSERVERALIAS/$SERVERALIAS/g" /etc/apache2/apache2.conf 25 | sed -i "s/MYDOCUMENTROOT/$DOCUMENTROOT/g" /etc/apache2/apache2.conf 26 | 27 | # Apache gets grumpy about PID files pre-existing 28 | rm -f /var/run/apache2/apache2.pid 29 | 30 | if [ -e /usr/bin/drush ]; then 31 | rm -f /usr/bin/drush 32 | fi 33 | 34 | # Set drush version 35 | if [ ! -z "$DRUSH_VERSION" ]; then 36 | ln -s /usr/bin/drush${DRUSH_VERSION} /usr/bin/drush 37 | else 38 | ln -s /usr/bin/drush8 /usr/bin/drush 39 | fi 40 | 41 | # Start Apache in foreground 42 | /usr/sbin/apache2 -DFOREGROUND 43 | -------------------------------------------------------------------------------- /7.1-0.1/core/envvars: -------------------------------------------------------------------------------- 1 | # envvars - default environment variables for apache2ctl 2 | 3 | # this won't be correct after changing uid 4 | unset HOME 5 | 6 | # for supporting multiple apache2 instances 7 | if [ "${APACHE_CONFDIR##/etc/apache2-}" != "${APACHE_CONFDIR}" ] ; then 8 | SUFFIX="-${APACHE_CONFDIR##/etc/apache2-}" 9 | else 10 | SUFFIX= 11 | fi 12 | 13 | # Since there is no sane way to get the parsed apache2 config in scripts, some 14 | # settings are defined via environment variables and then used in apache2ctl, 15 | # /etc/init.d/apache2, /etc/logrotate.d/apache2, etc. 16 | export APACHE_RUN_USER=web 17 | export APACHE_RUN_GROUP=www-data 18 | # temporary state file location. This might be changed to /run in Wheezy+1 19 | export APACHE_PID_FILE=/var/run/apache2/apache2$SUFFIX.pid 20 | export APACHE_RUN_DIR=/var/run/apache2$SUFFIX 21 | export APACHE_LOCK_DIR=/var/lock/apache2$SUFFIX 22 | # Only /var/log/apache2 is handled by /etc/logrotate.d/apache2. 23 | export APACHE_LOG_DIR=/var/log/apache2$SUFFIX 24 | 25 | ## The locale used by some modules like mod_dav 26 | export LANG=C 27 | ## Uncomment the following line to use the system default locale instead: 28 | #. /etc/default/locale 29 | 30 | export LANG 31 | 32 | ## The command to get the status for 'apache2ctl status'. 33 | ## Some packages providing 'www-browser' need '--dump' instead of '-dump'. 34 | #export APACHE_LYNX='www-browser -dump' 35 | 36 | ## If you need a higher file descriptor limit, uncomment and adjust the 37 | ## following line (default is 8192): 38 | #APACHE_ULIMIT_MAX_FILES='ulimit -n 65536' 39 | 40 | ## If you would like to pass arguments to the web server, add them below 41 | ## to the APACHE_ARGUMENTS environment. 42 | #export APACHE_ARGUMENTS='' 43 | 44 | ## Enable the debug mode for maintainer scripts. 45 | ## This will produce a verbose output on package installations of web server modules and web application 46 | ## installations which interact with Apache 47 | #export APACHE2_MAINTSCRIPT_DEBUG=1 48 | -------------------------------------------------------------------------------- /7.1-0.1/core/memcached.conf: -------------------------------------------------------------------------------- 1 | # memcached default config file 2 | # 2003 - Jay Bonci 3 | # This configuration file is read by the start-memcached script provided as 4 | # part of the Debian GNU/Linux distribution. 5 | 6 | # Run memcached as a daemon. This command is implied, and is not needed for the 7 | # daemon to run. See the README.Debian that comes with this package for more 8 | # information. 9 | -d 10 | 11 | # Log memcached's output to /var/log/memcached 12 | logfile /var/log/memcached.log 13 | 14 | # Be verbose 15 | # -v 16 | 17 | # Be even more verbose (print client commands as well) 18 | # -vv 19 | 20 | # Start with a cap of 64 megs of memory. It's reasonable, and the daemon default 21 | # Note that the daemon will grow to this size, but does not start out holding this much 22 | # memory 23 | -m 64 24 | 25 | # Default connection port is 11211 26 | -p 11211 27 | 28 | # Run the daemon as root. The start-memcached will default to running as root if no 29 | # -u command is present in this config file 30 | -u memcache 31 | 32 | # Specify which IP address to listen on. The default is to listen on all IP addresses 33 | # This parameter is one of the only security measures that memcached has, so make sure 34 | # it's listening on a firewalled interface. 35 | -l memcache 36 | 37 | # Limit the number of simultaneous incoming connections. The daemon default is 1024 38 | # -c 1024 39 | 40 | # Lock down all paged memory. Consult with the README and homepage before you do this 41 | # -k 42 | 43 | # Return error when memory is exhausted (rather than removing items) 44 | # -M 45 | 46 | # Maximize core file limit 47 | # -r 48 | -------------------------------------------------------------------------------- /7.1-0.1/core/other-vhosts-access-log.conf: -------------------------------------------------------------------------------- 1 | # Define an access log for VirtualHosts that don't define their own logfile 2 | #CustomLog ${APACHE_LOG_DIR}/other_vhosts_access.log vhost_combined 3 | 4 | # vim: syntax=apache ts=4 sw=4 sts=4 sr noet 5 | -------------------------------------------------------------------------------- /7.1-0.1/core/php-smtp.ini: -------------------------------------------------------------------------------- 1 | ; This ini file sets the php sendmail path to ssmtp. Nothing more. 2 | 3 | [mail function] 4 | sendmail_path = /usr/sbin/ssmtp -t 5 | -------------------------------------------------------------------------------- /7.1-0.1/core/ssmtp.conf: -------------------------------------------------------------------------------- 1 | # Configuartion file for sSMTP sendmail 2 | 3 | # The person who gets all mail for userids < 1000 4 | # Make this empty to disable rewriting. 5 | root= 6 | 7 | # We want to use this with an exim container. Link these 8 | # so that that container will be reachable as 'exim' in 9 | # this container. 10 | mailhub=mailhog:1025 11 | 12 | # Where will the mail seem to come from? 13 | #rewriteDomain= 14 | 15 | # The full hostname 16 | #hostname= 17 | 18 | # Are users allowed to set their own From: address? (YES/NO) 19 | FromLineOverride=YES 20 | -------------------------------------------------------------------------------- /7.1-0.1/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 | -------------------------------------------------------------------------------- /7.1-0.1/docker-php-pecl-install: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | usage() { 5 | echo "usage: $0 [channel/] ..." 6 | echo " ie: $0 uploadprogress oauth-1.2.3" 7 | } 8 | 9 | if [ $# -eq 0 ]; then 10 | usage >&2 11 | exit 1 12 | fi 13 | 14 | pecl install "$@" 15 | 16 | while [ $# -gt 0 ]; do 17 | ext="$1" 18 | ext=$(echo "$ext" | cut -d- -f1) 19 | ext=$(echo "$ext" | cut -d\/ -f2) 20 | shift 21 | 22 | for module in $(find /usr/local/lib/php/extensions -name "$ext.so"); do 23 | ini="/usr/local/etc/php/conf.d/docker-php-pecl-$ext.ini" 24 | if grep -q zend_extension_entry "$module"; then 25 | # https://wiki.php.net/internals/extensions#loading_zend_extensions 26 | line="zend_extension=$(basename "$module")" 27 | else 28 | line="extension=$(basename "$module")" 29 | fi 30 | if ! grep -q "$line" "$ini" 2>/dev/null; then 31 | echo "$line" >> "$ini" 32 | fi 33 | done 34 | done 35 | 36 | rm -rf /tmp/* 37 | -------------------------------------------------------------------------------- /7.1-1.0/config/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 | SSLProtocol all -SSLv3 -TLSv1 -TLSv1.1 23 | SSLCipherSuite ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256 24 | 25 | 26 | Listen 443 27 | 28 | 29 | 30 | Options FollowSymLinks 31 | AllowOverride None 32 | Require all denied 33 | 34 | 35 | 36 | AllowOverride All 37 | Require all granted 38 | 39 | 40 | 41 | ServerName MYSERVERNAME 42 | ServerAlias MYSERVERALIAS 43 | DocumentRoot "/var/www/html/MYDOCUMENTROOT" 44 | 45 | Options Indexes FollowSymLinks MultiViews 46 | AllowOverride All 47 | Order allow,deny 48 | Allow from all 49 | 50 | #ErrorLog /var/log/apache2/error.log 51 | #LogLevel error 52 | SetEnvIf Remote_Addr "127\.0\.0\.1" loopback 53 | #CustomLog /var/log/apache2/access.log combined env=!loopback 54 | ServerSignature On 55 | 56 | 57 | AccessFileName .htaccess 58 | 59 | Require all denied 60 | 61 | 62 | LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined 63 | LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined 64 | LogFormat "%h %l %u %t \"%r\" %>s %O" common 65 | LogFormat "%{Referer}i -> %U" referer 66 | LogFormat "%{User-agent}i" agent 67 | 68 | CustomLog /proc/self/fd/1 combined 69 | 70 | 71 | SetHandler application/x-httpd-php 72 | 73 | 74 | # Multiple DirectoryIndex directives within the same context will add 75 | # to the list of resources to look for rather than replace 76 | # https://httpd.apache.org/docs/current/mod/mod_dir.html#directoryindex 77 | DirectoryIndex disabled 78 | DirectoryIndex index.php index.html 79 | 80 | IncludeOptional conf-enabled/*.conf 81 | IncludeOptional sites-enabled/*.conf 82 | -------------------------------------------------------------------------------- /7.1-1.0/config/bashrc: -------------------------------------------------------------------------------- 1 | # Use bash-completion, if available 2 | [[ $PS1 && -f /usr/share/bash-completion/bash_completion ]] && \ 3 | . /usr/share/bash-completion/bash_completion 4 | 5 | alias ll='ls -al' 6 | 7 | function xdebug() { 8 | xdb_usage() { echo "usage xdebug: on|off" 1>&2; } 9 | 10 | case "$1" in 11 | on) 12 | sudo sed -i 's/^;*\(.*xdebug\.so\)/\1/' /usr/local/etc/php/php.ini 13 | sudo service apache2 reload > /dev/null 14 | echo "xdebug on"; 15 | ;; 16 | off) 17 | 18 | sudo sed -i 's/^\(.*xdebug\.so\)/;\1/' /usr/local/etc/php/php.ini 19 | sudo service apache2 reload > /dev/null 20 | echo "xdebug off"; 21 | ;; 22 | *) 23 | xdb_usage 24 | esac 25 | } 26 | -------------------------------------------------------------------------------- /7.1-1.0/core/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | set -e 3 | 4 | # Set the apache user and group to match the host user. 5 | # This script will change the www-data UID/GID in the container from to 33 (default) to the UID/GID of the host user, if the current host user is not root. 6 | OWNER=$(stat -c '%u' /var/www/html) 7 | GROUP=$(stat -c '%g' /var/www/html) 8 | USERNAME=www-data 9 | [ -e "/etc/debian_version" ] || USERNAME=apache 10 | if [ "$OWNER" != "0" ]; then 11 | usermod -o -u $OWNER $USERNAME 12 | usermod -s /bin/bash $USERNAME 13 | groupmod -o -g $GROUP $USERNAME 14 | usermod -d /var/www/html $USERNAME 15 | chown -R --silent $USERNAME:$USERNAME /var/www/html 16 | fi 17 | echo The apache user and group has been set to the following: 18 | id $USERNAME 19 | 20 | usermod -d /var/www www-data 21 | 22 | # Apache2 custom servername, alias and documentroot 23 | sed -i "s/MYSERVERNAME/$SERVERNAME/g" /etc/apache2/apache2.conf 24 | sed -i "s/MYSERVERALIAS/$SERVERALIAS/g" /etc/apache2/apache2.conf 25 | sed -i "s/MYDOCUMENTROOT/$DOCUMENTROOT/g" /etc/apache2/apache2.conf 26 | 27 | # Apache gets grumpy about PID files pre-existing 28 | rm -f /var/run/apache2/apache2.pid 29 | 30 | # Start Apache in foreground 31 | /usr/sbin/apache2 -DFOREGROUND 32 | -------------------------------------------------------------------------------- /7.1-1.0/core/envvars: -------------------------------------------------------------------------------- 1 | # envvars - default environment variables for apache2ctl 2 | 3 | # this won't be correct after changing uid 4 | unset HOME 5 | 6 | # for supporting multiple apache2 instances 7 | if [ "${APACHE_CONFDIR##/etc/apache2-}" != "${APACHE_CONFDIR}" ] ; then 8 | SUFFIX="-${APACHE_CONFDIR##/etc/apache2-}" 9 | else 10 | SUFFIX= 11 | fi 12 | 13 | # Since there is no sane way to get the parsed apache2 config in scripts, some 14 | # settings are defined via environment variables and then used in apache2ctl, 15 | # /etc/init.d/apache2, /etc/logrotate.d/apache2, etc. 16 | export APACHE_RUN_USER=web 17 | export APACHE_RUN_GROUP=www-data 18 | # temporary state file location. This might be changed to /run in Wheezy+1 19 | export APACHE_PID_FILE=/var/run/apache2/apache2$SUFFIX.pid 20 | export APACHE_RUN_DIR=/var/run/apache2$SUFFIX 21 | export APACHE_LOCK_DIR=/var/lock/apache2$SUFFIX 22 | # Only /var/log/apache2 is handled by /etc/logrotate.d/apache2. 23 | export APACHE_LOG_DIR=/var/log/apache2$SUFFIX 24 | 25 | ## The locale used by some modules like mod_dav 26 | export LANG=C 27 | ## Uncomment the following line to use the system default locale instead: 28 | #. /etc/default/locale 29 | 30 | export LANG 31 | 32 | ## The command to get the status for 'apache2ctl status'. 33 | ## Some packages providing 'www-browser' need '--dump' instead of '-dump'. 34 | #export APACHE_LYNX='www-browser -dump' 35 | 36 | ## If you need a higher file descriptor limit, uncomment and adjust the 37 | ## following line (default is 8192): 38 | #APACHE_ULIMIT_MAX_FILES='ulimit -n 65536' 39 | 40 | ## If you would like to pass arguments to the web server, add them below 41 | ## to the APACHE_ARGUMENTS environment. 42 | #export APACHE_ARGUMENTS='' 43 | 44 | ## Enable the debug mode for maintainer scripts. 45 | ## This will produce a verbose output on package installations of web server modules and web application 46 | ## installations which interact with Apache 47 | #export APACHE2_MAINTSCRIPT_DEBUG=1 48 | -------------------------------------------------------------------------------- /7.1-1.0/core/memcached.conf: -------------------------------------------------------------------------------- 1 | # memcached default config file 2 | # 2003 - Jay Bonci 3 | # This configuration file is read by the start-memcached script provided as 4 | # part of the Debian GNU/Linux distribution. 5 | 6 | # Run memcached as a daemon. This command is implied, and is not needed for the 7 | # daemon to run. See the README.Debian that comes with this package for more 8 | # information. 9 | -d 10 | 11 | # Log memcached's output to /var/log/memcached 12 | logfile /var/log/memcached.log 13 | 14 | # Be verbose 15 | # -v 16 | 17 | # Be even more verbose (print client commands as well) 18 | # -vv 19 | 20 | # Start with a cap of 64 megs of memory. It's reasonable, and the daemon default 21 | # Note that the daemon will grow to this size, but does not start out holding this much 22 | # memory 23 | -m 64 24 | 25 | # Default connection port is 11211 26 | -p 11211 27 | 28 | # Run the daemon as root. The start-memcached will default to running as root if no 29 | # -u command is present in this config file 30 | -u memcache 31 | 32 | # Specify which IP address to listen on. The default is to listen on all IP addresses 33 | # This parameter is one of the only security measures that memcached has, so make sure 34 | # it's listening on a firewalled interface. 35 | -l memcache 36 | 37 | # Limit the number of simultaneous incoming connections. The daemon default is 1024 38 | # -c 1024 39 | 40 | # Lock down all paged memory. Consult with the README and homepage before you do this 41 | # -k 42 | 43 | # Return error when memory is exhausted (rather than removing items) 44 | # -M 45 | 46 | # Maximize core file limit 47 | # -r 48 | -------------------------------------------------------------------------------- /7.1-1.0/core/other-vhosts-access-log.conf: -------------------------------------------------------------------------------- 1 | # Define an access log for VirtualHosts that don't define their own logfile 2 | #CustomLog ${APACHE_LOG_DIR}/other_vhosts_access.log vhost_combined 3 | 4 | # vim: syntax=apache ts=4 sw=4 sts=4 sr noet 5 | -------------------------------------------------------------------------------- /7.1-1.0/core/php-smtp.ini: -------------------------------------------------------------------------------- 1 | ; This ini file sets the php sendmail path to ssmtp. Nothing more. 2 | 3 | [mail function] 4 | sendmail_path = /usr/sbin/ssmtp -t 5 | -------------------------------------------------------------------------------- /7.1-1.0/core/ssmtp.conf: -------------------------------------------------------------------------------- 1 | # Configuartion file for sSMTP sendmail 2 | 3 | # The person who gets all mail for userids < 1000 4 | # Make this empty to disable rewriting. 5 | root= 6 | 7 | # We want to use this with an exim container. Link these 8 | # so that that container will be reachable as 'exim' in 9 | # this container. 10 | mailhub=mailhog:1025 11 | 12 | # Where will the mail seem to come from? 13 | #rewriteDomain= 14 | 15 | # The full hostname 16 | #hostname= 17 | 18 | # Are users allowed to set their own From: address? (YES/NO) 19 | FromLineOverride=YES 20 | -------------------------------------------------------------------------------- /7.1-1.0/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 | -------------------------------------------------------------------------------- /7.1-1.0/docker-php-pecl-install: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | usage() { 5 | echo "usage: $0 [channel/] ..." 6 | echo " ie: $0 uploadprogress oauth-1.2.3" 7 | } 8 | 9 | if [ $# -eq 0 ]; then 10 | usage >&2 11 | exit 1 12 | fi 13 | 14 | pecl install "$@" 15 | 16 | while [ $# -gt 0 ]; do 17 | ext="$1" 18 | ext=$(echo "$ext" | cut -d- -f1) 19 | ext=$(echo "$ext" | cut -d\/ -f2) 20 | shift 21 | 22 | for module in $(find /usr/local/lib/php/extensions -name "$ext.so"); do 23 | ini="/usr/local/etc/php/conf.d/docker-php-pecl-$ext.ini" 24 | if grep -q zend_extension_entry "$module"; then 25 | # https://wiki.php.net/internals/extensions#loading_zend_extensions 26 | line="zend_extension=$(basename "$module")" 27 | else 28 | line="extension=$(basename "$module")" 29 | fi 30 | if ! grep -q "$line" "$ini" 2>/dev/null; then 31 | echo "$line" >> "$ini" 32 | fi 33 | done 34 | done 35 | 36 | rm -rf /tmp/* 37 | -------------------------------------------------------------------------------- /7.1/config/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 | SSLProtocol all -SSLv3 -TLSv1 -TLSv1.1 23 | SSLCipherSuite ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256 24 | 25 | 26 | 27 | Options FollowSymLinks 28 | AllowOverride None 29 | Require all denied 30 | 31 | 32 | 33 | AllowOverride All 34 | Require all granted 35 | 36 | 37 | 38 | ServerName MYSERVERNAME 39 | ServerAlias MYSERVERALIAS 40 | DocumentRoot "/var/www/html/MYDOCUMENTROOT" 41 | 42 | Options Indexes FollowSymLinks MultiViews 43 | AllowOverride All 44 | Order allow,deny 45 | Allow from all 46 | 47 | #ErrorLog /var/log/apache2/error.log 48 | #LogLevel error 49 | SetEnvIf Remote_Addr "127\.0\.0\.1" loopback 50 | #CustomLog /var/log/apache2/access.log combined env=!loopback 51 | ServerSignature On 52 | 53 | 54 | AccessFileName .htaccess 55 | 56 | Require all denied 57 | 58 | 59 | LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined 60 | LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined 61 | LogFormat "%h %l %u %t \"%r\" %>s %O" common 62 | LogFormat "%{Referer}i -> %U" referer 63 | LogFormat "%{User-agent}i" agent 64 | 65 | CustomLog /proc/self/fd/1 combined 66 | 67 | 68 | SetHandler application/x-httpd-php 69 | 70 | 71 | # Multiple DirectoryIndex directives within the same context will add 72 | # to the list of resources to look for rather than replace 73 | # https://httpd.apache.org/docs/current/mod/mod_dir.html#directoryindex 74 | DirectoryIndex disabled 75 | DirectoryIndex index.php index.html 76 | 77 | IncludeOptional conf-enabled/*.conf 78 | IncludeOptional sites-enabled/*.conf 79 | -------------------------------------------------------------------------------- /7.1/config/bashrc: -------------------------------------------------------------------------------- 1 | # Use bash-completion, if available 2 | [[ $PS1 && -f /usr/share/bash-completion/bash_completion ]] && \ 3 | . /usr/share/bash-completion/bash_completion 4 | 5 | alias ll='ls -al' 6 | 7 | function xdebug() { 8 | xdb_usage() { echo "usage xdebug: on|off" 1>&2; } 9 | 10 | case "$1" in 11 | on) 12 | sudo sed -i 's/^;*\(.*xdebug\.so\)/\1/' /usr/local/etc/php/php.ini 13 | sudo service apache2 reload > /dev/null 14 | echo "xdebug on"; 15 | ;; 16 | off) 17 | 18 | sudo sed -i 's/^\(.*xdebug\.so\)/;\1/' /usr/local/etc/php/php.ini 19 | sudo service apache2 reload > /dev/null 20 | echo "xdebug off"; 21 | ;; 22 | *) 23 | xdb_usage 24 | esac 25 | } 26 | -------------------------------------------------------------------------------- /7.1/core/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | set -e 3 | 4 | # Set the apache user and group to match the host user. 5 | # This script will change the www-data UID/GID in the container from to 33 (default) to the UID/GID of the host user, if the current host user is not root. 6 | OWNER=$(stat -c '%u' /var/www/html) 7 | GROUP=$(stat -c '%g' /var/www/html) 8 | USERNAME=www-data 9 | [ -e "/etc/debian_version" ] || USERNAME=apache 10 | if [ "$OWNER" != "0" ]; then 11 | usermod -o -u $OWNER $USERNAME 12 | usermod -s /bin/bash $USERNAME 13 | groupmod -o -g $GROUP $USERNAME 14 | usermod -d /var/www/html $USERNAME 15 | chown -R --silent $USERNAME:$USERNAME /var/www/html 16 | fi 17 | echo The apache user and group has been set to the following: 18 | id $USERNAME 19 | 20 | usermod -d /var/www www-data 21 | 22 | # Apache2 custom servername, alias and documentroot 23 | sed -i "s/MYSERVERNAME/$SERVERNAME/g" /etc/apache2/apache2.conf 24 | sed -i "s/MYSERVERALIAS/$SERVERALIAS/g" /etc/apache2/apache2.conf 25 | sed -i "s/MYDOCUMENTROOT/$DOCUMENTROOT/g" /etc/apache2/apache2.conf 26 | 27 | # Apache gets grumpy about PID files pre-existing 28 | rm -f /var/run/apache2/apache2.pid 29 | 30 | # Start Apache in foreground 31 | /usr/sbin/apache2 -DFOREGROUND 32 | -------------------------------------------------------------------------------- /7.1/core/envvars: -------------------------------------------------------------------------------- 1 | # envvars - default environment variables for apache2ctl 2 | 3 | # this won't be correct after changing uid 4 | unset HOME 5 | 6 | # for supporting multiple apache2 instances 7 | if [ "${APACHE_CONFDIR##/etc/apache2-}" != "${APACHE_CONFDIR}" ] ; then 8 | SUFFIX="-${APACHE_CONFDIR##/etc/apache2-}" 9 | else 10 | SUFFIX= 11 | fi 12 | 13 | # Since there is no sane way to get the parsed apache2 config in scripts, some 14 | # settings are defined via environment variables and then used in apache2ctl, 15 | # /etc/init.d/apache2, /etc/logrotate.d/apache2, etc. 16 | export APACHE_RUN_USER=web 17 | export APACHE_RUN_GROUP=www-data 18 | # temporary state file location. This might be changed to /run in Wheezy+1 19 | export APACHE_PID_FILE=/var/run/apache2/apache2$SUFFIX.pid 20 | export APACHE_RUN_DIR=/var/run/apache2$SUFFIX 21 | export APACHE_LOCK_DIR=/var/lock/apache2$SUFFIX 22 | # Only /var/log/apache2 is handled by /etc/logrotate.d/apache2. 23 | export APACHE_LOG_DIR=/var/log/apache2$SUFFIX 24 | 25 | ## The locale used by some modules like mod_dav 26 | export LANG=C 27 | ## Uncomment the following line to use the system default locale instead: 28 | #. /etc/default/locale 29 | 30 | export LANG 31 | 32 | ## The command to get the status for 'apache2ctl status'. 33 | ## Some packages providing 'www-browser' need '--dump' instead of '-dump'. 34 | #export APACHE_LYNX='www-browser -dump' 35 | 36 | ## If you need a higher file descriptor limit, uncomment and adjust the 37 | ## following line (default is 8192): 38 | #APACHE_ULIMIT_MAX_FILES='ulimit -n 65536' 39 | 40 | ## If you would like to pass arguments to the web server, add them below 41 | ## to the APACHE_ARGUMENTS environment. 42 | #export APACHE_ARGUMENTS='' 43 | 44 | ## Enable the debug mode for maintainer scripts. 45 | ## This will produce a verbose output on package installations of web server modules and web application 46 | ## installations which interact with Apache 47 | #export APACHE2_MAINTSCRIPT_DEBUG=1 48 | -------------------------------------------------------------------------------- /7.1/core/memcached.conf: -------------------------------------------------------------------------------- 1 | # memcached default config file 2 | # 2003 - Jay Bonci 3 | # This configuration file is read by the start-memcached script provided as 4 | # part of the Debian GNU/Linux distribution. 5 | 6 | # Run memcached as a daemon. This command is implied, and is not needed for the 7 | # daemon to run. See the README.Debian that comes with this package for more 8 | # information. 9 | -d 10 | 11 | # Log memcached's output to /var/log/memcached 12 | logfile /var/log/memcached.log 13 | 14 | # Be verbose 15 | # -v 16 | 17 | # Be even more verbose (print client commands as well) 18 | # -vv 19 | 20 | # Start with a cap of 64 megs of memory. It's reasonable, and the daemon default 21 | # Note that the daemon will grow to this size, but does not start out holding this much 22 | # memory 23 | -m 64 24 | 25 | # Default connection port is 11211 26 | -p 11211 27 | 28 | # Run the daemon as root. The start-memcached will default to running as root if no 29 | # -u command is present in this config file 30 | -u memcache 31 | 32 | # Specify which IP address to listen on. The default is to listen on all IP addresses 33 | # This parameter is one of the only security measures that memcached has, so make sure 34 | # it's listening on a firewalled interface. 35 | -l memcache 36 | 37 | # Limit the number of simultaneous incoming connections. The daemon default is 1024 38 | # -c 1024 39 | 40 | # Lock down all paged memory. Consult with the README and homepage before you do this 41 | # -k 42 | 43 | # Return error when memory is exhausted (rather than removing items) 44 | # -M 45 | 46 | # Maximize core file limit 47 | # -r 48 | -------------------------------------------------------------------------------- /7.1/core/other-vhosts-access-log.conf: -------------------------------------------------------------------------------- 1 | # Define an access log for VirtualHosts that don't define their own logfile 2 | #CustomLog ${APACHE_LOG_DIR}/other_vhosts_access.log vhost_combined 3 | 4 | # vim: syntax=apache ts=4 sw=4 sts=4 sr noet 5 | -------------------------------------------------------------------------------- /7.1/core/php-smtp.ini: -------------------------------------------------------------------------------- 1 | ; This ini file sets the php sendmail path to ssmtp. Nothing more. 2 | 3 | [mail function] 4 | sendmail_path = /usr/sbin/ssmtp -t 5 | -------------------------------------------------------------------------------- /7.1/core/ssmtp.conf: -------------------------------------------------------------------------------- 1 | # Configuartion file for sSMTP sendmail 2 | 3 | # The person who gets all mail for userids < 1000 4 | # Make this empty to disable rewriting. 5 | root= 6 | 7 | # We want to use this with an exim container. Link these 8 | # so that that container will be reachable as 'exim' in 9 | # this container. 10 | mailhub=mailhog:1025 11 | 12 | # Where will the mail seem to come from? 13 | #rewriteDomain= 14 | 15 | # The full hostname 16 | #hostname= 17 | 18 | # Are users allowed to set their own From: address? (YES/NO) 19 | FromLineOverride=YES 20 | -------------------------------------------------------------------------------- /7.1/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 -j$(nproc) 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 | -------------------------------------------------------------------------------- /7.1/docker-php-pecl-install: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | usage() { 5 | echo "usage: $0 [channel/] ..." 6 | echo " ie: $0 uploadprogress oauth-1.2.3" 7 | } 8 | 9 | if [ $# -eq 0 ]; then 10 | usage >&2 11 | exit 1 12 | fi 13 | 14 | pecl install "$@" 15 | 16 | while [ $# -gt 0 ]; do 17 | ext="$1" 18 | ext=$(echo "$ext" | cut -d- -f1) 19 | ext=$(echo "$ext" | cut -d\/ -f2) 20 | shift 21 | 22 | for module in $(find /usr/local/lib/php/extensions -name "$ext.so"); do 23 | ini="/usr/local/etc/php/conf.d/docker-php-pecl-$ext.ini" 24 | if grep -q zend_extension_entry "$module"; then 25 | # https://wiki.php.net/internals/extensions#loading_zend_extensions 26 | line="zend_extension=$(basename "$module")" 27 | else 28 | line="extension=$(basename "$module")" 29 | fi 30 | if ! grep -q "$line" "$ini" 2>/dev/null; then 31 | echo "$line" >> "$ini" 32 | fi 33 | done 34 | done 35 | 36 | rm -rf /tmp/* 37 | -------------------------------------------------------------------------------- /7.2-1.0/config/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 | SSLProtocol all -SSLv3 -TLSv1 -TLSv1.1 23 | SSLCipherSuite ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256 24 | 25 | 26 | 27 | Options FollowSymLinks 28 | AllowOverride None 29 | Require all denied 30 | 31 | 32 | 33 | AllowOverride All 34 | Require all granted 35 | 36 | 37 | 38 | ServerName MYSERVERNAME 39 | ServerAlias MYSERVERALIAS 40 | DocumentRoot "/var/www/html/MYDOCUMENTROOT" 41 | 42 | Options Indexes FollowSymLinks MultiViews 43 | AllowOverride All 44 | Order allow,deny 45 | Allow from all 46 | 47 | #ErrorLog /var/log/apache2/error.log 48 | #LogLevel error 49 | SetEnvIf Remote_Addr "127\.0\.0\.1" loopback 50 | #CustomLog /var/log/apache2/access.log combined env=!loopback 51 | ServerSignature On 52 | 53 | 54 | AccessFileName .htaccess 55 | 56 | Require all denied 57 | 58 | 59 | LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined 60 | LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined 61 | LogFormat "%h %l %u %t \"%r\" %>s %O" common 62 | LogFormat "%{Referer}i -> %U" referer 63 | LogFormat "%{User-agent}i" agent 64 | 65 | CustomLog /proc/self/fd/1 combined 66 | 67 | 68 | SetHandler application/x-httpd-php 69 | 70 | 71 | # Multiple DirectoryIndex directives within the same context will add 72 | # to the list of resources to look for rather than replace 73 | # https://httpd.apache.org/docs/current/mod/mod_dir.html#directoryindex 74 | DirectoryIndex disabled 75 | DirectoryIndex index.php index.html 76 | 77 | IncludeOptional conf-enabled/*.conf 78 | IncludeOptional sites-enabled/*.conf 79 | -------------------------------------------------------------------------------- /7.2-1.0/config/bashrc: -------------------------------------------------------------------------------- 1 | # Use bash-completion, if available 2 | [[ $PS1 && -f /usr/share/bash-completion/bash_completion ]] && \ 3 | . /usr/share/bash-completion/bash_completion 4 | 5 | alias ll='ls -al' 6 | 7 | function xdebug() { 8 | xdb_usage() { echo "usage xdebug: on|off" 1>&2; } 9 | 10 | case "$1" in 11 | on) 12 | sudo sed -i 's/^;*\(.*xdebug\.so\)/\1/' /usr/local/etc/php/php.ini 13 | sudo service apache2 reload > /dev/null 14 | echo "xdebug on"; 15 | ;; 16 | off) 17 | 18 | sudo sed -i 's/^\(.*xdebug\.so\)/;\1/' /usr/local/etc/php/php.ini 19 | sudo service apache2 reload > /dev/null 20 | echo "xdebug off"; 21 | ;; 22 | *) 23 | xdb_usage 24 | esac 25 | } 26 | -------------------------------------------------------------------------------- /7.2-1.0/core/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | set -e 3 | 4 | # Set the apache user and group to match the host user. 5 | # This script will change the www-data UID/GID in the container from to 33 (default) to the UID/GID of the host user, if the current host user is not root. 6 | OWNER=$(stat -c '%u' /var/www/html) 7 | GROUP=$(stat -c '%g' /var/www/html) 8 | USERNAME=www-data 9 | [ -e "/etc/debian_version" ] || USERNAME=apache 10 | if [ "$OWNER" != "0" ]; then 11 | usermod -o -u $OWNER $USERNAME 12 | usermod -s /bin/bash $USERNAME 13 | groupmod -o -g $GROUP $USERNAME 14 | usermod -d /var/www/html $USERNAME 15 | chown -R --silent $USERNAME:$USERNAME /var/www/html 16 | fi 17 | echo The apache user and group has been set to the following: 18 | id $USERNAME 19 | 20 | usermod -d /var/www www-data 21 | 22 | # Apache2 custom servername, alias and documentroot 23 | sed -i "s/MYSERVERNAME/$SERVERNAME/g" /etc/apache2/apache2.conf 24 | sed -i "s/MYSERVERALIAS/$SERVERALIAS/g" /etc/apache2/apache2.conf 25 | sed -i "s/MYDOCUMENTROOT/$DOCUMENTROOT/g" /etc/apache2/apache2.conf 26 | 27 | # Apache gets grumpy about PID files pre-existing 28 | rm -f /var/run/apache2/apache2.pid 29 | 30 | 31 | #Remove symlink to avoid conflict in case of rebooting container 32 | if [ -e /usr/bin/drush ]; then 33 | rm -f /usr/bin/drush 34 | fi 35 | 36 | # Set drush version 37 | if [ ! -z "$DRUSH_VERSION" ]; then 38 | ln -s /usr/bin/drush${DRUSH_VERSION} /usr/bin/drush 39 | else 40 | ln -s /usr/bin/drush8 /usr/bin/drush 41 | fi 42 | 43 | # Start Apache in foreground 44 | /usr/sbin/apache2 -DFOREGROUND 45 | 46 | 47 | -------------------------------------------------------------------------------- /7.2-1.0/core/envvars: -------------------------------------------------------------------------------- 1 | # envvars - default environment variables for apache2ctl 2 | 3 | # this won't be correct after changing uid 4 | unset HOME 5 | 6 | # for supporting multiple apache2 instances 7 | if [ "${APACHE_CONFDIR##/etc/apache2-}" != "${APACHE_CONFDIR}" ] ; then 8 | SUFFIX="-${APACHE_CONFDIR##/etc/apache2-}" 9 | else 10 | SUFFIX= 11 | fi 12 | 13 | # Since there is no sane way to get the parsed apache2 config in scripts, some 14 | # settings are defined via environment variables and then used in apache2ctl, 15 | # /etc/init.d/apache2, /etc/logrotate.d/apache2, etc. 16 | export APACHE_RUN_USER=web 17 | export APACHE_RUN_GROUP=www-data 18 | # temporary state file location. This might be changed to /run in Wheezy+1 19 | export APACHE_PID_FILE=/var/run/apache2/apache2$SUFFIX.pid 20 | export APACHE_RUN_DIR=/var/run/apache2$SUFFIX 21 | export APACHE_LOCK_DIR=/var/lock/apache2$SUFFIX 22 | # Only /var/log/apache2 is handled by /etc/logrotate.d/apache2. 23 | export APACHE_LOG_DIR=/var/log/apache2$SUFFIX 24 | 25 | ## The locale used by some modules like mod_dav 26 | export LANG=C 27 | ## Uncomment the following line to use the system default locale instead: 28 | #. /etc/default/locale 29 | 30 | export LANG 31 | 32 | ## The command to get the status for 'apache2ctl status'. 33 | ## Some packages providing 'www-browser' need '--dump' instead of '-dump'. 34 | #export APACHE_LYNX='www-browser -dump' 35 | 36 | ## If you need a higher file descriptor limit, uncomment and adjust the 37 | ## following line (default is 8192): 38 | #APACHE_ULIMIT_MAX_FILES='ulimit -n 65536' 39 | 40 | ## If you would like to pass arguments to the web server, add them below 41 | ## to the APACHE_ARGUMENTS environment. 42 | #export APACHE_ARGUMENTS='' 43 | 44 | ## Enable the debug mode for maintainer scripts. 45 | ## This will produce a verbose output on package installations of web server modules and web application 46 | ## installations which interact with Apache 47 | #export APACHE2_MAINTSCRIPT_DEBUG=1 48 | -------------------------------------------------------------------------------- /7.2-1.0/core/memcached.conf: -------------------------------------------------------------------------------- 1 | # memcached default config file 2 | # 2003 - Jay Bonci 3 | # This configuration file is read by the start-memcached script provided as 4 | # part of the Debian GNU/Linux distribution. 5 | 6 | # Run memcached as a daemon. This command is implied, and is not needed for the 7 | # daemon to run. See the README.Debian that comes with this package for more 8 | # information. 9 | -d 10 | 11 | # Log memcached's output to /var/log/memcached 12 | logfile /var/log/memcached.log 13 | 14 | # Be verbose 15 | # -v 16 | 17 | # Be even more verbose (print client commands as well) 18 | # -vv 19 | 20 | # Start with a cap of 64 megs of memory. It's reasonable, and the daemon default 21 | # Note that the daemon will grow to this size, but does not start out holding this much 22 | # memory 23 | -m 64 24 | 25 | # Default connection port is 11211 26 | -p 11211 27 | 28 | # Run the daemon as root. The start-memcached will default to running as root if no 29 | # -u command is present in this config file 30 | -u memcache 31 | 32 | # Specify which IP address to listen on. The default is to listen on all IP addresses 33 | # This parameter is one of the only security measures that memcached has, so make sure 34 | # it's listening on a firewalled interface. 35 | -l memcache 36 | 37 | # Limit the number of simultaneous incoming connections. The daemon default is 1024 38 | # -c 1024 39 | 40 | # Lock down all paged memory. Consult with the README and homepage before you do this 41 | # -k 42 | 43 | # Return error when memory is exhausted (rather than removing items) 44 | # -M 45 | 46 | # Maximize core file limit 47 | # -r 48 | -------------------------------------------------------------------------------- /7.2-1.0/core/msmtprc.conf: -------------------------------------------------------------------------------- 1 | defaults 2 | tls off 3 | tls_certcheck off 4 | tls_starttls off 5 | 6 | account default 7 | host mailhog 8 | port 1025 9 | 10 | auto_from off 11 | from MY_OUTGOING_ADDRESS 12 | maildomain MY_EMAIL_DOMAIN 13 | -------------------------------------------------------------------------------- /7.2-1.0/core/other-vhosts-access-log.conf: -------------------------------------------------------------------------------- 1 | # Define an access log for VirtualHosts that don't define their own logfile 2 | #CustomLog ${APACHE_LOG_DIR}/other_vhosts_access.log vhost_combined 3 | 4 | # vim: syntax=apache ts=4 sw=4 sts=4 sr noet 5 | -------------------------------------------------------------------------------- /7.2-1.0/core/php-smtp.ini: -------------------------------------------------------------------------------- 1 | ; This ini file sets the php sendmail path to ssmtp. Nothing more. 2 | 3 | [mail function] 4 | sendmail_path = /usr/bin/msmtp -C /usr/local/etc/msmtprc -t 5 | -------------------------------------------------------------------------------- /7.2-1.0/core/ssmtp.conf: -------------------------------------------------------------------------------- 1 | # Configuartion file for sSMTP sendmail 2 | 3 | # The person who gets all mail for userids < 1000 4 | # Make this empty to disable rewriting. 5 | root= 6 | 7 | # We want to use this with an exim container. Link these 8 | # so that that container will be reachable as 'exim' in 9 | # this container. 10 | mailhub=mailhog:1025 11 | 12 | # Where will the mail seem to come from? 13 | #rewriteDomain= 14 | 15 | # The full hostname 16 | #hostname= 17 | 18 | # Are users allowed to set their own From: address? (YES/NO) 19 | FromLineOverride=YES 20 | -------------------------------------------------------------------------------- /7.2-1.0/docker-php-ext-install: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | # prefer user supplied CFLAGS, but default to our PHP_CFLAGS 5 | : ${CFLAGS:=$PHP_CFLAGS} 6 | : ${CPPFLAGS:=$PHP_CPPFLAGS} 7 | : ${LDFLAGS:=$PHP_LDFLAGS} 8 | export CFLAGS CPPFLAGS LDFLAGS 9 | 10 | srcExists= 11 | if [ -d /usr/src/php ]; then 12 | srcExists=1 13 | fi 14 | docker-php-source extract 15 | if [ -z "$srcExists" ]; then 16 | touch /usr/src/php/.docker-delete-me 17 | fi 18 | 19 | cd /usr/src/php/ext 20 | 21 | usage() { 22 | echo "usage: $0 [-jN] ext-name [ext-name ...]" 23 | echo " ie: $0 gd mysqli" 24 | echo " $0 pdo pdo_mysql" 25 | echo " $0 -j5 gd mbstring mysqli pdo pdo_mysql shmop" 26 | echo 27 | echo 'if custom ./configure arguments are necessary, see docker-php-ext-configure' 28 | echo 29 | echo 'Possible values for ext-name:' 30 | find . \ 31 | -mindepth 2 \ 32 | -maxdepth 2 \ 33 | -type f \ 34 | -name 'config.m4' \ 35 | | xargs -n1 dirname \ 36 | | xargs -n1 basename \ 37 | | sort \ 38 | | xargs 39 | echo 40 | echo 'Some of the above modules are already compiled into PHP; please check' 41 | echo 'the output of "php -i" to see which modules are already loaded.' 42 | } 43 | 44 | opts="$(getopt -o 'h?j:' --long 'help,jobs:' -- "$@" || { usage >&2 && false; })" 45 | eval set -- "$opts" 46 | 47 | j=1 48 | while true; do 49 | flag="$1" 50 | shift 51 | case "$flag" in 52 | --help|-h|'-?') usage && exit 0 ;; 53 | --jobs|-j) j="$1" && shift ;; 54 | --) break ;; 55 | *) 56 | { 57 | echo "error: unknown flag: $flag" 58 | usage 59 | } >&2 60 | exit 1 61 | ;; 62 | esac 63 | done 64 | 65 | exts= 66 | for ext; do 67 | if [ -z "$ext" ]; then 68 | continue 69 | fi 70 | if [ ! -d "$ext" ]; then 71 | echo >&2 "error: $PWD/$ext does not exist" 72 | echo >&2 73 | usage >&2 74 | exit 1 75 | fi 76 | exts="$exts $ext" 77 | done 78 | 79 | if [ -z "$exts" ]; then 80 | usage >&2 81 | exit 1 82 | fi 83 | 84 | pm='unknown' 85 | if [ -e /lib/apk/db/installed ]; then 86 | pm='apk' 87 | fi 88 | 89 | apkDel= 90 | if [ "$pm" = 'apk' ]; then 91 | if [ -n "$PHPIZE_DEPS" ]; then 92 | if apk info --installed .phpize-deps-configure > /dev/null; then 93 | apkDel='.phpize-deps-configure' 94 | elif ! apk info --installed .phpize-deps > /dev/null; then 95 | apk add --no-cache --virtual .phpize-deps $PHPIZE_DEPS 96 | apkDel='.phpize-deps' 97 | fi 98 | fi 99 | fi 100 | 101 | popDir="$PWD" 102 | for ext in $exts; do 103 | cd "$ext" 104 | [ -e Makefile ] || docker-php-ext-configure "$ext" 105 | make -j"$j" 106 | make -j"$j" install 107 | find modules \ 108 | -maxdepth 1 \ 109 | -name '*.so' \ 110 | -exec basename '{}' ';' \ 111 | | xargs -r docker-php-ext-enable 112 | make -j"$j" clean 113 | cd "$popDir" 114 | done 115 | 116 | if [ "$pm" = 'apk' ] && [ -n "$apkDel" ]; then 117 | apk del $apkDel 118 | fi 119 | 120 | if [ -e /usr/src/php/.docker-delete-me ]; then 121 | docker-php-source delete 122 | fi 123 | -------------------------------------------------------------------------------- /7.2-1.0/docker-php-pecl-install: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | usage() { 5 | echo "usage: $0 [channel/] ..." 6 | echo " ie: $0 uploadprogress oauth-1.2.3" 7 | } 8 | 9 | if [ $# -eq 0 ]; then 10 | usage >&2 11 | exit 1 12 | fi 13 | 14 | pecl install "$@" 15 | 16 | while [ $# -gt 0 ]; do 17 | ext="$1" 18 | ext=$(echo "$ext" | cut -d- -f1) 19 | ext=$(echo "$ext" | cut -d\/ -f2) 20 | shift 21 | 22 | for module in $(find /usr/local/lib/php/extensions -name "$ext.so"); do 23 | ini="/usr/local/etc/php/conf.d/docker-php-pecl-$ext.ini" 24 | if grep -q zend_extension_entry "$module"; then 25 | # https://wiki.php.net/internals/extensions#loading_zend_extensions 26 | line="zend_extension=$(basename "$module")" 27 | else 28 | line="extension=$(basename "$module")" 29 | fi 30 | if ! grep -q "$line" "$ini" 2>/dev/null; then 31 | echo "$line" >> "$ini" 32 | fi 33 | done 34 | done 35 | 36 | rm -rf /tmp/* 37 | -------------------------------------------------------------------------------- /7.2-1.1/config/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 | SSLProtocol all -SSLv3 -TLSv1 -TLSv1.1 23 | SSLCipherSuite ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256 24 | 25 | 26 | Listen 443 27 | 28 | 29 | 30 | Options FollowSymLinks 31 | AllowOverride None 32 | Require all denied 33 | 34 | 35 | 36 | AllowOverride All 37 | Require all granted 38 | 39 | 40 | 41 | ServerName MYSERVERNAME 42 | ServerAlias MYSERVERALIAS 43 | DocumentRoot "/var/www/html/MYDOCUMENTROOT" 44 | 45 | Options Indexes FollowSymLinks MultiViews 46 | AllowOverride All 47 | Order allow,deny 48 | Allow from all 49 | 50 | #ErrorLog /var/log/apache2/error.log 51 | #LogLevel error 52 | SetEnvIf Remote_Addr "127\.0\.0\.1" loopback 53 | #CustomLog /var/log/apache2/access.log combined env=!loopback 54 | ServerSignature On 55 | 56 | 57 | AccessFileName .htaccess 58 | 59 | Require all denied 60 | 61 | 62 | LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined 63 | LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined 64 | LogFormat "%h %l %u %t \"%r\" %>s %O" common 65 | LogFormat "%{Referer}i -> %U" referer 66 | LogFormat "%{User-agent}i" agent 67 | 68 | CustomLog /proc/self/fd/1 combined 69 | 70 | 71 | SetHandler application/x-httpd-php 72 | 73 | 74 | # Multiple DirectoryIndex directives within the same context will add 75 | # to the list of resources to look for rather than replace 76 | # https://httpd.apache.org/docs/current/mod/mod_dir.html#directoryindex 77 | DirectoryIndex disabled 78 | DirectoryIndex index.php index.html 79 | 80 | IncludeOptional conf-enabled/*.conf 81 | IncludeOptional sites-enabled/*.conf 82 | -------------------------------------------------------------------------------- /7.2-1.1/config/bashrc: -------------------------------------------------------------------------------- 1 | # Use bash-completion, if available 2 | [[ $PS1 && -f /usr/share/bash-completion/bash_completion ]] && \ 3 | . /usr/share/bash-completion/bash_completion 4 | 5 | alias ll='ls -al' 6 | 7 | function xdebug() { 8 | xdb_usage() { echo "usage xdebug: on|off" 1>&2; } 9 | 10 | case "$1" in 11 | on) 12 | sudo sed -i 's/^;*\(.*xdebug\.so\)/\1/' /usr/local/etc/php/php.ini 13 | sudo service apache2 reload > /dev/null 14 | echo "xdebug on"; 15 | ;; 16 | off) 17 | 18 | sudo sed -i 's/^\(.*xdebug\.so\)/;\1/' /usr/local/etc/php/php.ini 19 | sudo service apache2 reload > /dev/null 20 | echo "xdebug off"; 21 | ;; 22 | *) 23 | xdb_usage 24 | esac 25 | } 26 | -------------------------------------------------------------------------------- /7.2-1.1/core/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | set -e 3 | 4 | # Set the apache user and group to match the host user. 5 | # This script will change the www-data UID/GID in the container from to 33 (default) to the UID/GID of the host user, if the current host user is not root. 6 | OWNER=$(stat -c '%u' /var/www/html) 7 | GROUP=$(stat -c '%g' /var/www/html) 8 | USERNAME=www-data 9 | [ -e "/etc/debian_version" ] || USERNAME=apache 10 | if [ "$OWNER" != "0" ]; then 11 | usermod -o -u $OWNER $USERNAME 12 | usermod -s /bin/bash $USERNAME 13 | groupmod -o -g $GROUP $USERNAME 14 | usermod -d /var/www/html $USERNAME 15 | chown -R --silent $USERNAME:$USERNAME /var/www/html 16 | fi 17 | echo The apache user and group has been set to the following: 18 | id $USERNAME 19 | 20 | usermod -d /var/www www-data 21 | 22 | # Apache2 custom servername, alias and documentroot 23 | sed -i "s/MYSERVERNAME/$SERVERNAME/g" /etc/apache2/apache2.conf 24 | sed -i "s/MYSERVERALIAS/$SERVERALIAS/g" /etc/apache2/apache2.conf 25 | sed -i "s/MYDOCUMENTROOT/$DOCUMENTROOT/g" /etc/apache2/apache2.conf 26 | 27 | # Apache gets grumpy about PID files pre-existing 28 | rm -f /var/run/apache2/apache2.pid 29 | 30 | 31 | #Remove symlink to avoid conflict in case of rebooting container 32 | if [ -e /usr/bin/drush ]; then 33 | rm -f /usr/bin/drush 34 | fi 35 | 36 | # Set drush version 37 | if [ ! -z "$DRUSH_VERSION" ]; then 38 | ln -s /usr/bin/drush${DRUSH_VERSION} /usr/bin/drush 39 | else 40 | ln -s /usr/bin/drush8 /usr/bin/drush 41 | fi 42 | 43 | # Start Apache in foreground 44 | /usr/sbin/apache2 -DFOREGROUND 45 | 46 | 47 | -------------------------------------------------------------------------------- /7.2-1.1/core/envvars: -------------------------------------------------------------------------------- 1 | # envvars - default environment variables for apache2ctl 2 | 3 | # this won't be correct after changing uid 4 | unset HOME 5 | 6 | # for supporting multiple apache2 instances 7 | if [ "${APACHE_CONFDIR##/etc/apache2-}" != "${APACHE_CONFDIR}" ] ; then 8 | SUFFIX="-${APACHE_CONFDIR##/etc/apache2-}" 9 | else 10 | SUFFIX= 11 | fi 12 | 13 | # Since there is no sane way to get the parsed apache2 config in scripts, some 14 | # settings are defined via environment variables and then used in apache2ctl, 15 | # /etc/init.d/apache2, /etc/logrotate.d/apache2, etc. 16 | export APACHE_RUN_USER=web 17 | export APACHE_RUN_GROUP=www-data 18 | # temporary state file location. This might be changed to /run in Wheezy+1 19 | export APACHE_PID_FILE=/var/run/apache2/apache2$SUFFIX.pid 20 | export APACHE_RUN_DIR=/var/run/apache2$SUFFIX 21 | export APACHE_LOCK_DIR=/var/lock/apache2$SUFFIX 22 | # Only /var/log/apache2 is handled by /etc/logrotate.d/apache2. 23 | export APACHE_LOG_DIR=/var/log/apache2$SUFFIX 24 | 25 | ## The locale used by some modules like mod_dav 26 | export LANG=C 27 | ## Uncomment the following line to use the system default locale instead: 28 | #. /etc/default/locale 29 | 30 | export LANG 31 | 32 | ## The command to get the status for 'apache2ctl status'. 33 | ## Some packages providing 'www-browser' need '--dump' instead of '-dump'. 34 | #export APACHE_LYNX='www-browser -dump' 35 | 36 | ## If you need a higher file descriptor limit, uncomment and adjust the 37 | ## following line (default is 8192): 38 | #APACHE_ULIMIT_MAX_FILES='ulimit -n 65536' 39 | 40 | ## If you would like to pass arguments to the web server, add them below 41 | ## to the APACHE_ARGUMENTS environment. 42 | #export APACHE_ARGUMENTS='' 43 | 44 | ## Enable the debug mode for maintainer scripts. 45 | ## This will produce a verbose output on package installations of web server modules and web application 46 | ## installations which interact with Apache 47 | #export APACHE2_MAINTSCRIPT_DEBUG=1 48 | -------------------------------------------------------------------------------- /7.2-1.1/core/memcached.conf: -------------------------------------------------------------------------------- 1 | # memcached default config file 2 | # 2003 - Jay Bonci 3 | # This configuration file is read by the start-memcached script provided as 4 | # part of the Debian GNU/Linux distribution. 5 | 6 | # Run memcached as a daemon. This command is implied, and is not needed for the 7 | # daemon to run. See the README.Debian that comes with this package for more 8 | # information. 9 | -d 10 | 11 | # Log memcached's output to /var/log/memcached 12 | logfile /var/log/memcached.log 13 | 14 | # Be verbose 15 | # -v 16 | 17 | # Be even more verbose (print client commands as well) 18 | # -vv 19 | 20 | # Start with a cap of 64 megs of memory. It's reasonable, and the daemon default 21 | # Note that the daemon will grow to this size, but does not start out holding this much 22 | # memory 23 | -m 64 24 | 25 | # Default connection port is 11211 26 | -p 11211 27 | 28 | # Run the daemon as root. The start-memcached will default to running as root if no 29 | # -u command is present in this config file 30 | -u memcache 31 | 32 | # Specify which IP address to listen on. The default is to listen on all IP addresses 33 | # This parameter is one of the only security measures that memcached has, so make sure 34 | # it's listening on a firewalled interface. 35 | -l memcache 36 | 37 | # Limit the number of simultaneous incoming connections. The daemon default is 1024 38 | # -c 1024 39 | 40 | # Lock down all paged memory. Consult with the README and homepage before you do this 41 | # -k 42 | 43 | # Return error when memory is exhausted (rather than removing items) 44 | # -M 45 | 46 | # Maximize core file limit 47 | # -r 48 | -------------------------------------------------------------------------------- /7.2-1.1/core/msmtprc.conf: -------------------------------------------------------------------------------- 1 | defaults 2 | tls off 3 | tls_certcheck off 4 | tls_starttls off 5 | 6 | account default 7 | host mailhog 8 | port 1025 9 | 10 | auto_from off 11 | from MY_OUTGOING_ADDRESS 12 | maildomain MY_EMAIL_DOMAIN 13 | -------------------------------------------------------------------------------- /7.2-1.1/core/other-vhosts-access-log.conf: -------------------------------------------------------------------------------- 1 | # Define an access log for VirtualHosts that don't define their own logfile 2 | #CustomLog ${APACHE_LOG_DIR}/other_vhosts_access.log vhost_combined 3 | 4 | # vim: syntax=apache ts=4 sw=4 sts=4 sr noet 5 | -------------------------------------------------------------------------------- /7.2-1.1/core/php-smtp.ini: -------------------------------------------------------------------------------- 1 | ; This ini file sets the php sendmail path to ssmtp. Nothing more. 2 | 3 | [mail function] 4 | sendmail_path = /usr/bin/msmtp -C /usr/local/etc/msmtprc -t 5 | -------------------------------------------------------------------------------- /7.2-1.1/core/ssmtp.conf: -------------------------------------------------------------------------------- 1 | # Configuartion file for sSMTP sendmail 2 | 3 | # The person who gets all mail for userids < 1000 4 | # Make this empty to disable rewriting. 5 | root= 6 | 7 | # We want to use this with an exim container. Link these 8 | # so that that container will be reachable as 'exim' in 9 | # this container. 10 | mailhub=mailhog:1025 11 | 12 | # Where will the mail seem to come from? 13 | #rewriteDomain= 14 | 15 | # The full hostname 16 | #hostname= 17 | 18 | # Are users allowed to set their own From: address? (YES/NO) 19 | FromLineOverride=YES 20 | -------------------------------------------------------------------------------- /7.2-1.1/docker-php-ext-install: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | # prefer user supplied CFLAGS, but default to our PHP_CFLAGS 5 | : ${CFLAGS:=$PHP_CFLAGS} 6 | : ${CPPFLAGS:=$PHP_CPPFLAGS} 7 | : ${LDFLAGS:=$PHP_LDFLAGS} 8 | export CFLAGS CPPFLAGS LDFLAGS 9 | 10 | srcExists= 11 | if [ -d /usr/src/php ]; then 12 | srcExists=1 13 | fi 14 | docker-php-source extract 15 | if [ -z "$srcExists" ]; then 16 | touch /usr/src/php/.docker-delete-me 17 | fi 18 | 19 | cd /usr/src/php/ext 20 | 21 | usage() { 22 | echo "usage: $0 [-jN] ext-name [ext-name ...]" 23 | echo " ie: $0 gd mysqli" 24 | echo " $0 pdo pdo_mysql" 25 | echo " $0 -j5 gd mbstring mysqli pdo pdo_mysql shmop" 26 | echo 27 | echo 'if custom ./configure arguments are necessary, see docker-php-ext-configure' 28 | echo 29 | echo 'Possible values for ext-name:' 30 | find . \ 31 | -mindepth 2 \ 32 | -maxdepth 2 \ 33 | -type f \ 34 | -name 'config.m4' \ 35 | | xargs -n1 dirname \ 36 | | xargs -n1 basename \ 37 | | sort \ 38 | | xargs 39 | echo 40 | echo 'Some of the above modules are already compiled into PHP; please check' 41 | echo 'the output of "php -i" to see which modules are already loaded.' 42 | } 43 | 44 | opts="$(getopt -o 'h?j:' --long 'help,jobs:' -- "$@" || { usage >&2 && false; })" 45 | eval set -- "$opts" 46 | 47 | j=1 48 | while true; do 49 | flag="$1" 50 | shift 51 | case "$flag" in 52 | --help|-h|'-?') usage && exit 0 ;; 53 | --jobs|-j) j="$1" && shift ;; 54 | --) break ;; 55 | *) 56 | { 57 | echo "error: unknown flag: $flag" 58 | usage 59 | } >&2 60 | exit 1 61 | ;; 62 | esac 63 | done 64 | 65 | exts= 66 | for ext; do 67 | if [ -z "$ext" ]; then 68 | continue 69 | fi 70 | if [ ! -d "$ext" ]; then 71 | echo >&2 "error: $PWD/$ext does not exist" 72 | echo >&2 73 | usage >&2 74 | exit 1 75 | fi 76 | exts="$exts $ext" 77 | done 78 | 79 | if [ -z "$exts" ]; then 80 | usage >&2 81 | exit 1 82 | fi 83 | 84 | pm='unknown' 85 | if [ -e /lib/apk/db/installed ]; then 86 | pm='apk' 87 | fi 88 | 89 | apkDel= 90 | if [ "$pm" = 'apk' ]; then 91 | if [ -n "$PHPIZE_DEPS" ]; then 92 | if apk info --installed .phpize-deps-configure > /dev/null; then 93 | apkDel='.phpize-deps-configure' 94 | elif ! apk info --installed .phpize-deps > /dev/null; then 95 | apk add --no-cache --virtual .phpize-deps $PHPIZE_DEPS 96 | apkDel='.phpize-deps' 97 | fi 98 | fi 99 | fi 100 | 101 | popDir="$PWD" 102 | for ext in $exts; do 103 | cd "$ext" 104 | [ -e Makefile ] || docker-php-ext-configure "$ext" 105 | make -j"$j" 106 | make -j"$j" install 107 | find modules \ 108 | -maxdepth 1 \ 109 | -name '*.so' \ 110 | -exec basename '{}' ';' \ 111 | | xargs -r docker-php-ext-enable 112 | make -j"$j" clean 113 | cd "$popDir" 114 | done 115 | 116 | if [ "$pm" = 'apk' ] && [ -n "$apkDel" ]; then 117 | apk del $apkDel 118 | fi 119 | 120 | if [ -e /usr/src/php/.docker-delete-me ]; then 121 | docker-php-source delete 122 | fi 123 | -------------------------------------------------------------------------------- /7.2-1.1/docker-php-pecl-install: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | usage() { 5 | echo "usage: $0 [channel/] ..." 6 | echo " ie: $0 uploadprogress oauth-1.2.3" 7 | } 8 | 9 | if [ $# -eq 0 ]; then 10 | usage >&2 11 | exit 1 12 | fi 13 | 14 | pecl install "$@" 15 | 16 | while [ $# -gt 0 ]; do 17 | ext="$1" 18 | ext=$(echo "$ext" | cut -d- -f1) 19 | ext=$(echo "$ext" | cut -d\/ -f2) 20 | shift 21 | 22 | for module in $(find /usr/local/lib/php/extensions -name "$ext.so"); do 23 | ini="/usr/local/etc/php/conf.d/docker-php-pecl-$ext.ini" 24 | if grep -q zend_extension_entry "$module"; then 25 | # https://wiki.php.net/internals/extensions#loading_zend_extensions 26 | line="zend_extension=$(basename "$module")" 27 | else 28 | line="extension=$(basename "$module")" 29 | fi 30 | if ! grep -q "$line" "$ini" 2>/dev/null; then 31 | echo "$line" >> "$ini" 32 | fi 33 | done 34 | done 35 | 36 | rm -rf /tmp/* 37 | -------------------------------------------------------------------------------- /7.2/config/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 | SSLProtocol all -SSLv3 -TLSv1 -TLSv1.1 23 | SSLCipherSuite ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256 24 | 25 | 26 | 27 | Options FollowSymLinks 28 | AllowOverride None 29 | Require all denied 30 | 31 | 32 | 33 | AllowOverride All 34 | Require all granted 35 | 36 | 37 | 38 | ServerName MYSERVERNAME 39 | ServerAlias MYSERVERALIAS 40 | DocumentRoot "/var/www/html/MYDOCUMENTROOT" 41 | 42 | Options Indexes FollowSymLinks MultiViews 43 | AllowOverride All 44 | Order allow,deny 45 | Allow from all 46 | 47 | #ErrorLog /var/log/apache2/error.log 48 | #LogLevel error 49 | SetEnvIf Remote_Addr "127\.0\.0\.1" loopback 50 | #CustomLog /var/log/apache2/access.log combined env=!loopback 51 | ServerSignature On 52 | 53 | 54 | AccessFileName .htaccess 55 | 56 | Require all denied 57 | 58 | 59 | LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined 60 | LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined 61 | LogFormat "%h %l %u %t \"%r\" %>s %O" common 62 | LogFormat "%{Referer}i -> %U" referer 63 | LogFormat "%{User-agent}i" agent 64 | 65 | CustomLog /proc/self/fd/1 combined 66 | 67 | 68 | SetHandler application/x-httpd-php 69 | 70 | 71 | # Multiple DirectoryIndex directives within the same context will add 72 | # to the list of resources to look for rather than replace 73 | # https://httpd.apache.org/docs/current/mod/mod_dir.html#directoryindex 74 | DirectoryIndex disabled 75 | DirectoryIndex index.php index.html 76 | 77 | IncludeOptional conf-enabled/*.conf 78 | IncludeOptional sites-enabled/*.conf 79 | -------------------------------------------------------------------------------- /7.2/config/bashrc: -------------------------------------------------------------------------------- 1 | alias ll='ls -al' 2 | 3 | function xdebug() { 4 | xdb_usage() { echo "usage xdebug: on|off" 1>&2; } 5 | 6 | case "$1" in 7 | on) 8 | sudo sed -i 's/^;*\(.*xdebug\.so\)/\1/' /usr/local/etc/php/php.ini 9 | sudo service apache2 reload > /dev/null 10 | echo "xdebug on"; 11 | ;; 12 | off) 13 | 14 | sudo sed -i 's/^\(.*xdebug\.so\)/;\1/' /usr/local/etc/php/php.ini 15 | sudo service apache2 reload > /dev/null 16 | echo "xdebug off"; 17 | ;; 18 | *) 19 | xdb_usage 20 | esac 21 | } 22 | -------------------------------------------------------------------------------- /7.2/core/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | set -e 3 | 4 | # Set the apache user and group to match the host user. 5 | # This script will change the www-data UID/GID in the container from to 33 (default) to the UID/GID of the host user, if the current host user is not root. 6 | OWNER=$(stat -c '%u' /var/www/html) 7 | GROUP=$(stat -c '%g' /var/www/html) 8 | USERNAME=www-data 9 | [ -e "/etc/debian_version" ] || USERNAME=apache 10 | if [ "$OWNER" != "0" ]; then 11 | usermod -o -u $OWNER $USERNAME 12 | usermod -s /bin/bash $USERNAME 13 | groupmod -o -g $GROUP $USERNAME 14 | usermod -d /var/www/html $USERNAME 15 | chown -R --silent $USERNAME:$USERNAME /var/www/html 16 | fi 17 | echo The apache user and group has been set to the following: 18 | id $USERNAME 19 | 20 | usermod -d /var/www www-data 21 | 22 | # Apache2 custom servername, alias and documentroot 23 | sed -i "s/MYSERVERNAME/$SERVERNAME/g" /etc/apache2/apache2.conf 24 | sed -i "s/MYSERVERALIAS/$SERVERALIAS/g" /etc/apache2/apache2.conf 25 | sed -i "s/MYDOCUMENTROOT/$DOCUMENTROOT/g" /etc/apache2/apache2.conf 26 | 27 | # Configure msmtp 28 | sed -i "s/MY_SMTP/$SMTP/g" /usr/local/etc/msmtprc 29 | sed -i "s/MY_EMAIL_DOMAIN/$EMAIL_DOMAIN/g" /usr/local/etc/msmtprc 30 | sed -i "s/MY_OUTGOING_ADDRESS/$OUTGOING_ADDRESS/g" /usr/local/etc/msmtprc 31 | 32 | # set msmtp permissions 33 | chmod 600 /usr/local/etc/msmtprc && chown web /usr/local/etc/msmtprc 34 | 35 | # Apache gets grumpy about PID files pre-existing 36 | rm -f /var/run/apache2/apache2.pid 37 | 38 | 39 | #Remove symlink to avoid conflict in case of rebooting container 40 | if [ -e /usr/bin/drush ]; then 41 | rm -f /usr/bin/drush 42 | fi 43 | 44 | # Set drush version 45 | if [ ! -z "$DRUSH_VERSION" ]; then 46 | ln -s /usr/bin/drush${DRUSH_VERSION} /usr/bin/drush 47 | else 48 | ln -s /usr/bin/drush8 /usr/bin/drush 49 | fi 50 | 51 | # Start Apache in foreground 52 | /usr/sbin/apache2 -DFOREGROUND 53 | 54 | 55 | -------------------------------------------------------------------------------- /7.2/core/envvars: -------------------------------------------------------------------------------- 1 | # envvars - default environment variables for apache2ctl 2 | 3 | # this won't be correct after changing uid 4 | unset HOME 5 | 6 | # for supporting multiple apache2 instances 7 | if [ "${APACHE_CONFDIR##/etc/apache2-}" != "${APACHE_CONFDIR}" ] ; then 8 | SUFFIX="-${APACHE_CONFDIR##/etc/apache2-}" 9 | else 10 | SUFFIX= 11 | fi 12 | 13 | # Since there is no sane way to get the parsed apache2 config in scripts, some 14 | # settings are defined via environment variables and then used in apache2ctl, 15 | # /etc/init.d/apache2, /etc/logrotate.d/apache2, etc. 16 | export APACHE_RUN_USER=web 17 | export APACHE_RUN_GROUP=www-data 18 | # temporary state file location. This might be changed to /run in Wheezy+1 19 | export APACHE_PID_FILE=/var/run/apache2/apache2$SUFFIX.pid 20 | export APACHE_RUN_DIR=/var/run/apache2$SUFFIX 21 | export APACHE_LOCK_DIR=/var/lock/apache2$SUFFIX 22 | # Only /var/log/apache2 is handled by /etc/logrotate.d/apache2. 23 | export APACHE_LOG_DIR=/var/log/apache2$SUFFIX 24 | 25 | ## The locale used by some modules like mod_dav 26 | export LANG=C 27 | ## Uncomment the following line to use the system default locale instead: 28 | #. /etc/default/locale 29 | 30 | export LANG 31 | 32 | ## The command to get the status for 'apache2ctl status'. 33 | ## Some packages providing 'www-browser' need '--dump' instead of '-dump'. 34 | #export APACHE_LYNX='www-browser -dump' 35 | 36 | ## If you need a higher file descriptor limit, uncomment and adjust the 37 | ## following line (default is 8192): 38 | #APACHE_ULIMIT_MAX_FILES='ulimit -n 65536' 39 | 40 | ## If you would like to pass arguments to the web server, add them below 41 | ## to the APACHE_ARGUMENTS environment. 42 | #export APACHE_ARGUMENTS='' 43 | 44 | ## Enable the debug mode for maintainer scripts. 45 | ## This will produce a verbose output on package installations of web server modules and web application 46 | ## installations which interact with Apache 47 | #export APACHE2_MAINTSCRIPT_DEBUG=1 48 | -------------------------------------------------------------------------------- /7.2/core/memcached.conf: -------------------------------------------------------------------------------- 1 | # memcached default config file 2 | # 2003 - Jay Bonci 3 | # This configuration file is read by the start-memcached script provided as 4 | # part of the Debian GNU/Linux distribution. 5 | 6 | # Run memcached as a daemon. This command is implied, and is not needed for the 7 | # daemon to run. See the README.Debian that comes with this package for more 8 | # information. 9 | -d 10 | 11 | # Log memcached's output to /var/log/memcached 12 | logfile /var/log/memcached.log 13 | 14 | # Be verbose 15 | # -v 16 | 17 | # Be even more verbose (print client commands as well) 18 | # -vv 19 | 20 | # Start with a cap of 64 megs of memory. It's reasonable, and the daemon default 21 | # Note that the daemon will grow to this size, but does not start out holding this much 22 | # memory 23 | -m 64 24 | 25 | # Default connection port is 11211 26 | -p 11211 27 | 28 | # Run the daemon as root. The start-memcached will default to running as root if no 29 | # -u command is present in this config file 30 | -u memcache 31 | 32 | # Specify which IP address to listen on. The default is to listen on all IP addresses 33 | # This parameter is one of the only security measures that memcached has, so make sure 34 | # it's listening on a firewalled interface. 35 | -l memcache 36 | 37 | # Limit the number of simultaneous incoming connections. The daemon default is 1024 38 | # -c 1024 39 | 40 | # Lock down all paged memory. Consult with the README and homepage before you do this 41 | # -k 42 | 43 | # Return error when memory is exhausted (rather than removing items) 44 | # -M 45 | 46 | # Maximize core file limit 47 | # -r 48 | -------------------------------------------------------------------------------- /7.2/core/msmtprc.conf: -------------------------------------------------------------------------------- 1 | defaults 2 | tls off 3 | tls_certcheck off 4 | tls_starttls off 5 | 6 | account default 7 | host mailhog 8 | port 1025 9 | 10 | auto_from off 11 | from MY_OUTGOING_ADDRESS 12 | maildomain MY_EMAIL_DOMAIN 13 | -------------------------------------------------------------------------------- /7.2/core/other-vhosts-access-log.conf: -------------------------------------------------------------------------------- 1 | # Define an access log for VirtualHosts that don't define their own logfile 2 | #CustomLog ${APACHE_LOG_DIR}/other_vhosts_access.log vhost_combined 3 | 4 | # vim: syntax=apache ts=4 sw=4 sts=4 sr noet 5 | -------------------------------------------------------------------------------- /7.2/core/php-smtp.ini: -------------------------------------------------------------------------------- 1 | ; This ini file sets the php sendmail path to ssmtp. Nothing more. 2 | 3 | [mail function] 4 | sendmail_path = /usr/bin/msmtp -C /usr/local/etc/msmtprc -t 5 | -------------------------------------------------------------------------------- /7.2/docker-php-ext-install: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | # prefer user supplied CFLAGS, but default to our PHP_CFLAGS 5 | : ${CFLAGS:=$PHP_CFLAGS} 6 | : ${CPPFLAGS:=$PHP_CPPFLAGS} 7 | : ${LDFLAGS:=$PHP_LDFLAGS} 8 | export CFLAGS CPPFLAGS LDFLAGS 9 | 10 | srcExists= 11 | if [ -d /usr/src/php ]; then 12 | srcExists=1 13 | fi 14 | docker-php-source extract 15 | if [ -z "$srcExists" ]; then 16 | touch /usr/src/php/.docker-delete-me 17 | fi 18 | 19 | cd /usr/src/php/ext 20 | 21 | usage() { 22 | echo "usage: $0 [-jN] ext-name [ext-name ...]" 23 | echo " ie: $0 gd mysqli" 24 | echo " $0 pdo pdo_mysql" 25 | echo " $0 -j5 gd mbstring mysqli pdo pdo_mysql shmop" 26 | echo 27 | echo 'if custom ./configure arguments are necessary, see docker-php-ext-configure' 28 | echo 29 | echo 'Possible values for ext-name:' 30 | find . \ 31 | -mindepth 2 \ 32 | -maxdepth 2 \ 33 | -type f \ 34 | -name 'config.m4' \ 35 | | xargs -n1 dirname \ 36 | | xargs -n1 basename \ 37 | | sort \ 38 | | xargs 39 | echo 40 | echo 'Some of the above modules are already compiled into PHP; please check' 41 | echo 'the output of "php -i" to see which modules are already loaded.' 42 | } 43 | 44 | opts="$(getopt -o 'h?j:' --long 'help,jobs:' -- "$@" || { usage >&2 && false; })" 45 | eval set -- "$opts" 46 | 47 | j=1 48 | while true; do 49 | flag="$1" 50 | shift 51 | case "$flag" in 52 | --help|-h|'-?') usage && exit 0 ;; 53 | --jobs|-j) j="$1" && shift ;; 54 | --) break ;; 55 | *) 56 | { 57 | echo "error: unknown flag: $flag" 58 | usage 59 | } >&2 60 | exit 1 61 | ;; 62 | esac 63 | done 64 | 65 | exts= 66 | for ext; do 67 | if [ -z "$ext" ]; then 68 | continue 69 | fi 70 | if [ ! -d "$ext" ]; then 71 | echo >&2 "error: $PWD/$ext does not exist" 72 | echo >&2 73 | usage >&2 74 | exit 1 75 | fi 76 | exts="$exts $ext" 77 | done 78 | 79 | if [ -z "$exts" ]; then 80 | usage >&2 81 | exit 1 82 | fi 83 | 84 | pm='unknown' 85 | if [ -e /lib/apk/db/installed ]; then 86 | pm='apk' 87 | fi 88 | 89 | apkDel= 90 | if [ "$pm" = 'apk' ]; then 91 | if [ -n "$PHPIZE_DEPS" ]; then 92 | if apk info --installed .phpize-deps-configure > /dev/null; then 93 | apkDel='.phpize-deps-configure' 94 | elif ! apk info --installed .phpize-deps > /dev/null; then 95 | apk add --no-cache --virtual .phpize-deps $PHPIZE_DEPS 96 | apkDel='.phpize-deps' 97 | fi 98 | fi 99 | fi 100 | 101 | popDir="$PWD" 102 | for ext in $exts; do 103 | cd "$ext" 104 | [ -e Makefile ] || docker-php-ext-configure "$ext" 105 | make -j"$j" 106 | make -j"$j" install 107 | find modules \ 108 | -maxdepth 1 \ 109 | -name '*.so' \ 110 | -exec basename '{}' ';' \ 111 | | xargs -r docker-php-ext-enable 112 | make -j"$j" clean 113 | cd "$popDir" 114 | done 115 | 116 | if [ "$pm" = 'apk' ] && [ -n "$apkDel" ]; then 117 | apk del $apkDel 118 | fi 119 | 120 | if [ -e /usr/src/php/.docker-delete-me ]; then 121 | docker-php-source delete 122 | fi 123 | -------------------------------------------------------------------------------- /7.2/docker-php-pecl-install: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | usage() { 5 | echo "usage: $0 [channel/] ..." 6 | echo " ie: $0 uploadprogress oauth-1.2.3" 7 | } 8 | 9 | if [ $# -eq 0 ]; then 10 | usage >&2 11 | exit 1 12 | fi 13 | 14 | pecl install "$@" 15 | 16 | while [ $# -gt 0 ]; do 17 | ext="$1" 18 | ext=$(echo "$ext" | cut -d- -f1) 19 | ext=$(echo "$ext" | cut -d\/ -f2) 20 | shift 21 | 22 | for module in $(find /usr/local/lib/php/extensions -name "$ext.so"); do 23 | ini="/usr/local/etc/php/conf.d/docker-php-pecl-$ext.ini" 24 | if grep -q zend_extension_entry "$module"; then 25 | # https://wiki.php.net/internals/extensions#loading_zend_extensions 26 | line="zend_extension=$(basename "$module")" 27 | else 28 | line="extension=$(basename "$module")" 29 | fi 30 | if ! grep -q "$line" "$ini" 2>/dev/null; then 31 | echo "$line" >> "$ini" 32 | fi 33 | done 34 | done 35 | 36 | rm -rf /tmp/* 37 | -------------------------------------------------------------------------------- /7.3.12/config/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 web 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 | SSLProtocol all -SSLv3 -TLSv1 -TLSv1.1 23 | SSLCipherSuite ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256 24 | 25 | 26 | 27 | Options FollowSymLinks 28 | AllowOverride None 29 | Require all denied 30 | 31 | 32 | 33 | AllowOverride All 34 | Require all granted 35 | 36 | 37 | 38 | ServerName localhost 39 | ServerAlias localhost 40 | DocumentRoot "/var/www/html/MYDOCUMENTROOT" 41 | 42 | Options Indexes FollowSymLinks MultiViews 43 | AllowOverride All 44 | Order allow,deny 45 | Allow from all 46 | 47 | #ErrorLog /var/log/apache2/error.log 48 | #LogLevel error 49 | SetEnvIf Remote_Addr "127\.0\.0\.1" loopback 50 | #CustomLog /var/log/apache2/access.log combined env=!loopback 51 | ServerSignature On 52 | 53 | 54 | AccessFileName .htaccess 55 | 56 | Require all denied 57 | 58 | 59 | LogFormat "%v:%p %{X-Forwarded-For}i %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined 60 | LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined 61 | LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %O" common 62 | LogFormat "%{Referer}i -> %U" referer 63 | LogFormat "%{User-agent}i" agent 64 | 65 | 66 | CustomLog /proc/self/fd/1 combined 67 | 68 | 69 | SetHandler application/x-httpd-php 70 | 71 | 72 | # Multiple DirectoryIndex directives within the same context will add 73 | # to the list of resources to look for rather than replace 74 | # https://httpd.apache.org/docs/current/mod/mod_dir.html#directoryindex 75 | DirectoryIndex disabled 76 | DirectoryIndex index.php index.html 77 | 78 | IncludeOptional conf-enabled/*.conf 79 | IncludeOptional sites-enabled/*.conf 80 | -------------------------------------------------------------------------------- /7.3.12/config/bashrc: -------------------------------------------------------------------------------- 1 | alias ll='ls -al' 2 | 3 | function xdebug() { 4 | xdb_usage() { echo "usage xdebug: on|off" 1>&2; } 5 | 6 | case "$1" in 7 | on) 8 | sudo sed -i 's/^;*\(.*xdebug\.so\)/\1/' /usr/local/etc/php/php.ini 9 | sudo service apache2 reload > /dev/null 10 | echo "xdebug on"; 11 | ;; 12 | off) 13 | 14 | sudo sed -i 's/^\(.*xdebug\.so\)/;\1/' /usr/local/etc/php/php.ini 15 | sudo service apache2 reload > /dev/null 16 | echo "xdebug off"; 17 | ;; 18 | *) 19 | xdb_usage 20 | esac 21 | } -------------------------------------------------------------------------------- /7.3.12/core/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | set -e 3 | 4 | # Apache2 custom servername, alias and documentroot 5 | sed -i "s/MYSERVERNAME/$SERVERNAME/g" /etc/apache2/apache2.conf 6 | sed -i "s/MYSERVERALIAS/$SERVERALIAS/g" /etc/apache2/apache2.conf 7 | sed -i "s/MYDOCUMENTROOT/$DOCUMENTROOT/g" /etc/apache2/apache2.conf 8 | 9 | # Configure msmtp 10 | sed -i "s/MY_SMTP/$SMTP/g" /usr/local/etc/msmtprc 11 | sed -i "s/MY_EMAIL_DOMAIN/$EMAIL_DOMAIN/g" /usr/local/etc/msmtprc 12 | sed -i "s/MY_OUTGOING_ADDRESS/$OUTGOING_ADDRESS/g" /usr/local/etc/msmtprc 13 | 14 | # If docker secret ssh_public_key exists copy it in /var/www/.ssh 15 | if [ -f /run/secrets/ssh_public_key ]; then 16 | echo "Using secret ssh_public_key" 17 | cp /run/secrets/ssh_public_key /var/www/.ssh/id_rsa.pub 18 | chown -R web:www-data /var/www/.ssh 19 | fi 20 | 21 | # If docker secret ssh_private_key exists copy it in /var/www/.ssh 22 | if [ -f /run/secrets/ssh_private_key ]; then 23 | echo "Using secret ssh_private_key" 24 | cp /run/secrets/ssh_private_key /var/www/.ssh/id_rsa 25 | chmod 600 /var/www/.ssh/id_rsa 26 | chown -R web:www-data /var/www/.ssh 27 | fi 28 | 29 | # Set the apache user and group to match the host user. 30 | # This script will change the web UID/GID in the container from to 999 (default) to the UID/GID of the host user, if the current host user is not root. 31 | OWNER=$(stat -c '%u' /var/www/html) 32 | GROUP=$(stat -c '%g' /var/www/html) 33 | USERNAME=web 34 | [ -e "/etc/debian_version" ] || USERNAME=apache 35 | if [ "$OWNER" != "0" ]; then 36 | usermod -o -u $OWNER $USERNAME 37 | groupmod -o -g $GROUP www-data 38 | fi 39 | 40 | # set msmtp permissions 41 | chmod 600 /usr/local/etc/msmtprc && chown web /usr/local/etc/msmtprc 42 | 43 | # Apache gets grumpy about PID files pre-existing 44 | rm -f /var/run/apache2/apache2.pid 45 | 46 | # Start Apache in foreground 47 | /usr/sbin/apache2 -DFOREGROUND 48 | -------------------------------------------------------------------------------- /7.3.12/core/envvars: -------------------------------------------------------------------------------- 1 | # envvars - default environment variables for apache2ctl 2 | 3 | # this won't be correct after changing uid 4 | unset HOME 5 | 6 | # for supporting multiple apache2 instances 7 | if [ "${APACHE_CONFDIR##/etc/apache2-}" != "${APACHE_CONFDIR}" ] ; then 8 | SUFFIX="-${APACHE_CONFDIR##/etc/apache2-}" 9 | else 10 | SUFFIX= 11 | fi 12 | 13 | # Since there is no sane way to get the parsed apache2 config in scripts, some 14 | # settings are defined via environment variables and then used in apache2ctl, 15 | # /etc/init.d/apache2, /etc/logrotate.d/apache2, etc. 16 | export APACHE_RUN_USER=web 17 | export APACHE_RUN_GROUP=www-data 18 | # temporary state file location. This might be changed to /run in Wheezy+1 19 | export APACHE_PID_FILE=/var/run/apache2/apache2$SUFFIX.pid 20 | export APACHE_RUN_DIR=/var/run/apache2$SUFFIX 21 | export APACHE_LOCK_DIR=/var/lock/apache2$SUFFIX 22 | # Only /var/log/apache2 is handled by /etc/logrotate.d/apache2. 23 | export APACHE_LOG_DIR=/var/log/apache2$SUFFIX 24 | 25 | ## The locale used by some modules like mod_dav 26 | export LANG=C 27 | ## Uncomment the following line to use the system default locale instead: 28 | #. /etc/default/locale 29 | 30 | export LANG 31 | 32 | ## The command to get the status for 'apache2ctl status'. 33 | ## Some packages providing 'www-browser' need '--dump' instead of '-dump'. 34 | #export APACHE_LYNX='www-browser -dump' 35 | 36 | ## If you need a higher file descriptor limit, uncomment and adjust the 37 | ## following line (default is 8192): 38 | #APACHE_ULIMIT_MAX_FILES='ulimit -n 65536' 39 | 40 | ## If you would like to pass arguments to the web server, add them below 41 | ## to the APACHE_ARGUMENTS environment. 42 | #export APACHE_ARGUMENTS='' 43 | 44 | ## Enable the debug mode for maintainer scripts. 45 | ## This will produce a verbose output on package installations of web server modules and web application 46 | ## installations which interact with Apache 47 | #export APACHE2_MAINTSCRIPT_DEBUG=1 48 | -------------------------------------------------------------------------------- /7.3.12/core/msmtprc.conf: -------------------------------------------------------------------------------- 1 | defaults 2 | tls off 3 | tls_certcheck off 4 | tls_starttls off 5 | 6 | account default 7 | host MY_SMTP 8 | #modified 9 | port 1025 10 | 11 | auto_from off 12 | from MY_OUTGOING_ADDRESS 13 | maildomain MY_EMAIL_DOMAIN 14 | -------------------------------------------------------------------------------- /7.3.12/core/other-vhosts-access-log.conf: -------------------------------------------------------------------------------- 1 | # Define an access log for VirtualHosts that don't define their own logfile 2 | #CustomLog ${APACHE_LOG_DIR}/other_vhosts_access.log vhost_combined 3 | 4 | # vim: syntax=apache ts=4 sw=4 sts=4 sr noet 5 | -------------------------------------------------------------------------------- /7.3.12/core/php-smtp.ini: -------------------------------------------------------------------------------- 1 | ; This ini file sets the php sendmail path to ssmtp. Nothing more. 2 | 3 | [mail function] 4 | sendmail_path = /usr/bin/msmtp -C /usr/local/etc/msmtprc -t -------------------------------------------------------------------------------- /7.4/config/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 web 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 | SSLProtocol all -SSLv3 -TLSv1 -TLSv1.1 23 | SSLCipherSuite ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256 24 | 25 | 26 | 27 | Options FollowSymLinks 28 | AllowOverride None 29 | Require all denied 30 | 31 | 32 | 33 | AllowOverride All 34 | Require all granted 35 | 36 | 37 | 38 | ServerName localhost 39 | ServerAlias localhost 40 | DocumentRoot "/var/www/html/MYDOCUMENTROOT" 41 | 42 | Options Indexes FollowSymLinks MultiViews 43 | AllowOverride All 44 | Order allow,deny 45 | Allow from all 46 | 47 | #ErrorLog /var/log/apache2/error.log 48 | #LogLevel error 49 | SetEnvIf Remote_Addr "127\.0\.0\.1" loopback 50 | #CustomLog /var/log/apache2/access.log combined env=!loopback 51 | ServerSignature On 52 | 53 | 54 | AccessFileName .htaccess 55 | 56 | Require all denied 57 | 58 | 59 | LogFormat "%v:%p %{X-Forwarded-For}i %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined 60 | LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined 61 | LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %O" common 62 | LogFormat "%{Referer}i -> %U" referer 63 | LogFormat "%{User-agent}i" agent 64 | 65 | 66 | CustomLog /proc/self/fd/1 combined 67 | 68 | 69 | SetHandler application/x-httpd-php 70 | 71 | 72 | # Multiple DirectoryIndex directives within the same context will add 73 | # to the list of resources to look for rather than replace 74 | # https://httpd.apache.org/docs/current/mod/mod_dir.html#directoryindex 75 | DirectoryIndex disabled 76 | DirectoryIndex index.php index.html 77 | 78 | IncludeOptional conf-enabled/*.conf 79 | IncludeOptional sites-enabled/*.conf 80 | -------------------------------------------------------------------------------- /7.4/config/bashrc: -------------------------------------------------------------------------------- 1 | alias ll='ls -al' 2 | 3 | function xdebug() { 4 | xdb_usage() { echo "usage xdebug: on|off" 1>&2; } 5 | 6 | case "$1" in 7 | on) 8 | sudo sed -i 's/^;*\(.*xdebug\.so\)/\1/' /usr/local/etc/php/php.ini 9 | sudo service apache2 reload > /dev/null 10 | echo "xdebug on"; 11 | ;; 12 | off) 13 | 14 | sudo sed -i 's/^\(.*xdebug\.so\)/;\1/' /usr/local/etc/php/php.ini 15 | sudo service apache2 reload > /dev/null 16 | echo "xdebug off"; 17 | ;; 18 | *) 19 | xdb_usage 20 | esac 21 | } -------------------------------------------------------------------------------- /7.4/core/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | set -e 3 | 4 | # Apache2 custom servername, alias and documentroot 5 | sed -i "s/MYSERVERNAME/$SERVERNAME/g" /etc/apache2/apache2.conf 6 | sed -i "s/MYSERVERALIAS/$SERVERALIAS/g" /etc/apache2/apache2.conf 7 | sed -i "s/MYDOCUMENTROOT/$DOCUMENTROOT/g" /etc/apache2/apache2.conf 8 | 9 | # Configure msmtp 10 | sed -i "s/MY_SMTP/$SMTP/g" /usr/local/etc/msmtprc 11 | sed -i "s/MY_EMAIL_DOMAIN/$EMAIL_DOMAIN/g" /usr/local/etc/msmtprc 12 | sed -i "s/MY_OUTGOING_ADDRESS/$OUTGOING_ADDRESS/g" /usr/local/etc/msmtprc 13 | 14 | # If docker secret ssh_public_key exists copy it in /var/www/.ssh 15 | if [ -f /run/secrets/ssh_public_key ]; then 16 | echo "Using secret ssh_public_key" 17 | cp /run/secrets/ssh_public_key /var/www/.ssh/id_rsa.pub 18 | chown -R web:www-data /var/www/.ssh 19 | fi 20 | 21 | # If docker secret ssh_private_key exists copy it in /var/www/.ssh 22 | if [ -f /run/secrets/ssh_private_key ]; then 23 | echo "Using secret ssh_private_key" 24 | cp /run/secrets/ssh_private_key /var/www/.ssh/id_rsa 25 | chmod 600 /var/www/.ssh/id_rsa 26 | chown -R web:www-data /var/www/.ssh 27 | fi 28 | 29 | # Set the apache user and group to match the host user. 30 | # This script will change the web UID/GID in the container from to 999 (default) to the UID/GID of the host user, if the current host user is not root. 31 | OWNER=$(stat -c '%u' /var/www/html) 32 | GROUP=$(stat -c '%g' /var/www/html) 33 | USERNAME=web 34 | [ -e "/etc/debian_version" ] || USERNAME=apache 35 | if [ "$OWNER" != "0" ]; then 36 | usermod -o -u $OWNER $USERNAME 37 | groupmod -o -g $GROUP www-data 38 | fi 39 | 40 | # set msmtp permissions 41 | chmod 600 /usr/local/etc/msmtprc && chown web /usr/local/etc/msmtprc 42 | 43 | # Apache gets grumpy about PID files pre-existing 44 | rm -f /var/run/apache2/apache2.pid 45 | 46 | # Start Apache in foreground 47 | /usr/sbin/apache2 -DFOREGROUND 48 | -------------------------------------------------------------------------------- /7.4/core/envvars: -------------------------------------------------------------------------------- 1 | # envvars - default environment variables for apache2ctl 2 | 3 | # this won't be correct after changing uid 4 | unset HOME 5 | 6 | # for supporting multiple apache2 instances 7 | if [ "${APACHE_CONFDIR##/etc/apache2-}" != "${APACHE_CONFDIR}" ] ; then 8 | SUFFIX="-${APACHE_CONFDIR##/etc/apache2-}" 9 | else 10 | SUFFIX= 11 | fi 12 | 13 | # Since there is no sane way to get the parsed apache2 config in scripts, some 14 | # settings are defined via environment variables and then used in apache2ctl, 15 | # /etc/init.d/apache2, /etc/logrotate.d/apache2, etc. 16 | export APACHE_RUN_USER=web 17 | export APACHE_RUN_GROUP=www-data 18 | # temporary state file location. This might be changed to /run in Wheezy+1 19 | export APACHE_PID_FILE=/var/run/apache2/apache2$SUFFIX.pid 20 | export APACHE_RUN_DIR=/var/run/apache2$SUFFIX 21 | export APACHE_LOCK_DIR=/var/lock/apache2$SUFFIX 22 | # Only /var/log/apache2 is handled by /etc/logrotate.d/apache2. 23 | export APACHE_LOG_DIR=/var/log/apache2$SUFFIX 24 | 25 | ## The locale used by some modules like mod_dav 26 | export LANG=C 27 | ## Uncomment the following line to use the system default locale instead: 28 | #. /etc/default/locale 29 | 30 | export LANG 31 | 32 | ## The command to get the status for 'apache2ctl status'. 33 | ## Some packages providing 'www-browser' need '--dump' instead of '-dump'. 34 | #export APACHE_LYNX='www-browser -dump' 35 | 36 | ## If you need a higher file descriptor limit, uncomment and adjust the 37 | ## following line (default is 8192): 38 | #APACHE_ULIMIT_MAX_FILES='ulimit -n 65536' 39 | 40 | ## If you would like to pass arguments to the web server, add them below 41 | ## to the APACHE_ARGUMENTS environment. 42 | #export APACHE_ARGUMENTS='' 43 | 44 | ## Enable the debug mode for maintainer scripts. 45 | ## This will produce a verbose output on package installations of web server modules and web application 46 | ## installations which interact with Apache 47 | #export APACHE2_MAINTSCRIPT_DEBUG=1 48 | -------------------------------------------------------------------------------- /7.4/core/msmtprc.conf: -------------------------------------------------------------------------------- 1 | defaults 2 | tls off 3 | tls_certcheck off 4 | tls_starttls off 5 | 6 | account default 7 | host MY_SMTP 8 | #modified 9 | port 1025 10 | 11 | auto_from off 12 | from MY_OUTGOING_ADDRESS 13 | maildomain MY_EMAIL_DOMAIN 14 | -------------------------------------------------------------------------------- /7.4/core/other-vhosts-access-log.conf: -------------------------------------------------------------------------------- 1 | # Define an access log for VirtualHosts that don't define their own logfile 2 | #CustomLog ${APACHE_LOG_DIR}/other_vhosts_access.log vhost_combined 3 | 4 | # vim: syntax=apache ts=4 sw=4 sts=4 sr noet 5 | -------------------------------------------------------------------------------- /7.4/core/php-smtp.ini: -------------------------------------------------------------------------------- 1 | ; This ini file sets the php sendmail path to ssmtp. Nothing more. 2 | 3 | [mail function] 4 | sendmail_path = /usr/bin/msmtp -C /usr/local/etc/msmtprc -t -------------------------------------------------------------------------------- /8.0.1/config/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 web 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 | SSLProtocol all -SSLv3 -TLSv1 -TLSv1.1 23 | SSLCipherSuite ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256 24 | 25 | 26 | 27 | Options FollowSymLinks 28 | AllowOverride None 29 | Require all denied 30 | 31 | 32 | 33 | AllowOverride All 34 | Require all granted 35 | 36 | 37 | 38 | ServerName localhost 39 | ServerAlias localhost 40 | DocumentRoot "/var/www/html/MYDOCUMENTROOT" 41 | 42 | Options Indexes FollowSymLinks MultiViews 43 | AllowOverride All 44 | Order allow,deny 45 | Allow from all 46 | 47 | #ErrorLog /var/log/apache2/error.log 48 | #LogLevel error 49 | SetEnvIf Remote_Addr "127\.0\.0\.1" loopback 50 | #CustomLog /var/log/apache2/access.log combined env=!loopback 51 | ServerSignature On 52 | 53 | 54 | AccessFileName .htaccess 55 | 56 | Require all denied 57 | 58 | 59 | LogFormat "%v:%p %{X-Forwarded-For}i %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined 60 | LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined 61 | LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %O" common 62 | LogFormat "%{Referer}i -> %U" referer 63 | LogFormat "%{User-agent}i" agent 64 | 65 | 66 | CustomLog /proc/self/fd/1 combined 67 | 68 | 69 | SetHandler application/x-httpd-php 70 | 71 | 72 | # Multiple DirectoryIndex directives within the same context will add 73 | # to the list of resources to look for rather than replace 74 | # https://httpd.apache.org/docs/current/mod/mod_dir.html#directoryindex 75 | DirectoryIndex disabled 76 | DirectoryIndex index.php index.html 77 | 78 | IncludeOptional conf-enabled/*.conf 79 | IncludeOptional sites-enabled/*.conf 80 | -------------------------------------------------------------------------------- /8.0.1/config/bashrc: -------------------------------------------------------------------------------- 1 | alias ll='ls -al' 2 | 3 | function xdebug() { 4 | xdb_usage() { echo "usage xdebug: on|off" 1>&2; } 5 | 6 | case "$1" in 7 | on) 8 | sudo sed -i 's/^;*\(.*xdebug\.so\)/\1/' /usr/local/etc/php/php.ini 9 | sudo service apache2 reload > /dev/null 10 | echo "xdebug on"; 11 | ;; 12 | off) 13 | 14 | sudo sed -i 's/^\(.*xdebug\.so\)/;\1/' /usr/local/etc/php/php.ini 15 | sudo service apache2 reload > /dev/null 16 | echo "xdebug off"; 17 | ;; 18 | *) 19 | xdb_usage 20 | esac 21 | } -------------------------------------------------------------------------------- /8.0.1/core/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | set -e 3 | 4 | # Apache2 custom servername, alias and documentroot 5 | sed -i "s/MYSERVERNAME/$SERVERNAME/g" /etc/apache2/apache2.conf 6 | sed -i "s/MYSERVERALIAS/$SERVERALIAS/g" /etc/apache2/apache2.conf 7 | sed -i "s/MYDOCUMENTROOT/$DOCUMENTROOT/g" /etc/apache2/apache2.conf 8 | 9 | # Configure msmtp 10 | sed -i "s/MY_SMTP/$SMTP/g" /usr/local/etc/msmtprc 11 | sed -i "s/MY_EMAIL_DOMAIN/$EMAIL_DOMAIN/g" /usr/local/etc/msmtprc 12 | sed -i "s/MY_OUTGOING_ADDRESS/$OUTGOING_ADDRESS/g" /usr/local/etc/msmtprc 13 | 14 | # If docker secret ssh_public_key exists copy it in /var/www/.ssh 15 | if [ -f /run/secrets/ssh_public_key ]; then 16 | echo "Using secret ssh_public_key" 17 | cp /run/secrets/ssh_public_key /var/www/.ssh/id_rsa.pub 18 | chown -R web:www-data /var/www/.ssh 19 | fi 20 | 21 | # If docker secret ssh_private_key exists copy it in /var/www/.ssh 22 | if [ -f /run/secrets/ssh_private_key ]; then 23 | echo "Using secret ssh_private_key" 24 | cp /run/secrets/ssh_private_key /var/www/.ssh/id_rsa 25 | chmod 600 /var/www/.ssh/id_rsa 26 | chown -R web:www-data /var/www/.ssh 27 | fi 28 | 29 | # Set the apache user and group to match the host user. 30 | # This script will change the web UID/GID in the container from to 999 (default) to the UID/GID of the host user, if the current host user is not root. 31 | OWNER=$(stat -c '%u' /var/www/html) 32 | GROUP=$(stat -c '%g' /var/www/html) 33 | USERNAME=web 34 | [ -e "/etc/debian_version" ] || USERNAME=apache 35 | if [ "$OWNER" != "0" ]; then 36 | usermod -o -u $OWNER $USERNAME 37 | groupmod -o -g $GROUP www-data 38 | fi 39 | 40 | # set msmtp permissions 41 | chmod 600 /usr/local/etc/msmtprc && chown web /usr/local/etc/msmtprc 42 | 43 | # Apache gets grumpy about PID files pre-existing 44 | rm -f /var/run/apache2/apache2.pid 45 | 46 | # Start Apache in foreground 47 | /usr/sbin/apache2 -DFOREGROUND 48 | -------------------------------------------------------------------------------- /8.0.1/core/envvars: -------------------------------------------------------------------------------- 1 | # envvars - default environment variables for apache2ctl 2 | 3 | # this won't be correct after changing uid 4 | unset HOME 5 | 6 | # for supporting multiple apache2 instances 7 | if [ "${APACHE_CONFDIR##/etc/apache2-}" != "${APACHE_CONFDIR}" ] ; then 8 | SUFFIX="-${APACHE_CONFDIR##/etc/apache2-}" 9 | else 10 | SUFFIX= 11 | fi 12 | 13 | # Since there is no sane way to get the parsed apache2 config in scripts, some 14 | # settings are defined via environment variables and then used in apache2ctl, 15 | # /etc/init.d/apache2, /etc/logrotate.d/apache2, etc. 16 | export APACHE_RUN_USER=web 17 | export APACHE_RUN_GROUP=www-data 18 | # temporary state file location. This might be changed to /run in Wheezy+1 19 | export APACHE_PID_FILE=/var/run/apache2/apache2$SUFFIX.pid 20 | export APACHE_RUN_DIR=/var/run/apache2$SUFFIX 21 | export APACHE_LOCK_DIR=/var/lock/apache2$SUFFIX 22 | # Only /var/log/apache2 is handled by /etc/logrotate.d/apache2. 23 | export APACHE_LOG_DIR=/var/log/apache2$SUFFIX 24 | 25 | ## The locale used by some modules like mod_dav 26 | export LANG=C 27 | ## Uncomment the following line to use the system default locale instead: 28 | #. /etc/default/locale 29 | 30 | export LANG 31 | 32 | ## The command to get the status for 'apache2ctl status'. 33 | ## Some packages providing 'www-browser' need '--dump' instead of '-dump'. 34 | #export APACHE_LYNX='www-browser -dump' 35 | 36 | ## If you need a higher file descriptor limit, uncomment and adjust the 37 | ## following line (default is 8192): 38 | #APACHE_ULIMIT_MAX_FILES='ulimit -n 65536' 39 | 40 | ## If you would like to pass arguments to the web server, add them below 41 | ## to the APACHE_ARGUMENTS environment. 42 | #export APACHE_ARGUMENTS='' 43 | 44 | ## Enable the debug mode for maintainer scripts. 45 | ## This will produce a verbose output on package installations of web server modules and web application 46 | ## installations which interact with Apache 47 | #export APACHE2_MAINTSCRIPT_DEBUG=1 48 | -------------------------------------------------------------------------------- /8.0.1/core/msmtprc.conf: -------------------------------------------------------------------------------- 1 | defaults 2 | tls off 3 | tls_certcheck off 4 | tls_starttls off 5 | 6 | account default 7 | host MY_SMTP 8 | #modified 9 | port 1025 10 | 11 | auto_from off 12 | from MY_OUTGOING_ADDRESS 13 | maildomain MY_EMAIL_DOMAIN 14 | -------------------------------------------------------------------------------- /8.0.1/core/other-vhosts-access-log.conf: -------------------------------------------------------------------------------- 1 | # Define an access log for VirtualHosts that don't define their own logfile 2 | #CustomLog ${APACHE_LOG_DIR}/other_vhosts_access.log vhost_combined 3 | 4 | # vim: syntax=apache ts=4 sw=4 sts=4 sr noet 5 | -------------------------------------------------------------------------------- /8.0.1/core/php-smtp.ini: -------------------------------------------------------------------------------- 1 | ; This ini file sets the php sendmail path to ssmtp. Nothing more. 2 | 3 | [mail function] 4 | sendmail_path = /usr/bin/msmtp -C /usr/local/etc/msmtprc -t -------------------------------------------------------------------------------- /8.1/config/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 web 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 | SSLProtocol all -SSLv3 -TLSv1 -TLSv1.1 23 | SSLCipherSuite ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256 24 | 25 | 26 | 27 | Options FollowSymLinks 28 | AllowOverride None 29 | Require all denied 30 | 31 | 32 | 33 | AllowOverride All 34 | Require all granted 35 | 36 | 37 | 38 | ServerName localhost 39 | ServerAlias localhost 40 | DocumentRoot "/var/www/html/MYDOCUMENTROOT" 41 | 42 | Options Indexes FollowSymLinks MultiViews 43 | AllowOverride All 44 | Order allow,deny 45 | Allow from all 46 | 47 | #ErrorLog /var/log/apache2/error.log 48 | #LogLevel error 49 | SetEnvIf Remote_Addr "127\.0\.0\.1" loopback 50 | #CustomLog /var/log/apache2/access.log combined env=!loopback 51 | ServerSignature On 52 | 53 | 54 | AccessFileName .htaccess 55 | 56 | Require all denied 57 | 58 | 59 | LogFormat "%v:%p %{X-Forwarded-For}i %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined 60 | LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined 61 | LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %O" common 62 | LogFormat "%{Referer}i -> %U" referer 63 | LogFormat "%{User-agent}i" agent 64 | 65 | 66 | CustomLog /proc/self/fd/1 combined 67 | 68 | 69 | SetHandler application/x-httpd-php 70 | 71 | 72 | # Multiple DirectoryIndex directives within the same context will add 73 | # to the list of resources to look for rather than replace 74 | # https://httpd.apache.org/docs/current/mod/mod_dir.html#directoryindex 75 | DirectoryIndex disabled 76 | DirectoryIndex index.php index.html 77 | 78 | IncludeOptional conf-enabled/*.conf 79 | IncludeOptional sites-enabled/*.conf 80 | -------------------------------------------------------------------------------- /8.1/config/bashrc: -------------------------------------------------------------------------------- 1 | alias ll='ls -al' 2 | 3 | function xdebug() { 4 | xdb_usage() { echo "usage xdebug: on|off" 1>&2; } 5 | 6 | case "$1" in 7 | on) 8 | sudo sed -i 's/^;*\(.*xdebug\.so\)/\1/' /usr/local/etc/php/php.ini 9 | sudo service apache2 reload > /dev/null 10 | echo "xdebug on"; 11 | ;; 12 | off) 13 | 14 | sudo sed -i 's/^\(.*xdebug\.so\)/;\1/' /usr/local/etc/php/php.ini 15 | sudo service apache2 reload > /dev/null 16 | echo "xdebug off"; 17 | ;; 18 | *) 19 | xdb_usage 20 | esac 21 | } -------------------------------------------------------------------------------- /8.1/core/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | set -e 3 | 4 | # Apache2 custom servername, alias and documentroot 5 | sed -i "s/MYSERVERNAME/$SERVERNAME/g" /etc/apache2/apache2.conf 6 | sed -i "s/MYSERVERALIAS/$SERVERALIAS/g" /etc/apache2/apache2.conf 7 | sed -i "s/MYDOCUMENTROOT/$DOCUMENTROOT/g" /etc/apache2/apache2.conf 8 | 9 | # Configure msmtp 10 | sed -i "s/MY_SMTP/$SMTP/g" /usr/local/etc/msmtprc 11 | sed -i "s/MY_EMAIL_DOMAIN/$EMAIL_DOMAIN/g" /usr/local/etc/msmtprc 12 | sed -i "s/MY_OUTGOING_ADDRESS/$OUTGOING_ADDRESS/g" /usr/local/etc/msmtprc 13 | 14 | # If docker secret ssh_public_key exists copy it in /var/www/.ssh 15 | if [ -f /run/secrets/ssh_public_key ]; then 16 | echo "Using secret ssh_public_key" 17 | cp /run/secrets/ssh_public_key /var/www/.ssh/id_rsa.pub 18 | chown -R web:www-data /var/www/.ssh 19 | fi 20 | 21 | # If docker secret ssh_private_key exists copy it in /var/www/.ssh 22 | if [ -f /run/secrets/ssh_private_key ]; then 23 | echo "Using secret ssh_private_key" 24 | cp /run/secrets/ssh_private_key /var/www/.ssh/id_rsa 25 | chmod 600 /var/www/.ssh/id_rsa 26 | chown -R web:www-data /var/www/.ssh 27 | fi 28 | 29 | # Set the apache user and group to match the host user. 30 | # This script will change the web UID/GID in the container from to 999 (default) to the UID/GID of the host user, if the current host user is not root. 31 | OWNER=$(stat -c '%u' /var/www/html) 32 | GROUP=$(stat -c '%g' /var/www/html) 33 | USERNAME=web 34 | [ -e "/etc/debian_version" ] || USERNAME=apache 35 | if [ "$OWNER" != "0" ]; then 36 | usermod -o -u $OWNER $USERNAME 37 | groupmod -o -g $GROUP www-data 38 | fi 39 | 40 | # set msmtp permissions 41 | chmod 600 /usr/local/etc/msmtprc && chown web /usr/local/etc/msmtprc 42 | 43 | # Apache gets grumpy about PID files pre-existing 44 | rm -f /var/run/apache2/apache2.pid 45 | 46 | # Start Apache in foreground 47 | /usr/sbin/apache2 -DFOREGROUND 48 | -------------------------------------------------------------------------------- /8.1/core/envvars: -------------------------------------------------------------------------------- 1 | # envvars - default environment variables for apache2ctl 2 | 3 | # this won't be correct after changing uid 4 | unset HOME 5 | 6 | # for supporting multiple apache2 instances 7 | if [ "${APACHE_CONFDIR##/etc/apache2-}" != "${APACHE_CONFDIR}" ] ; then 8 | SUFFIX="-${APACHE_CONFDIR##/etc/apache2-}" 9 | else 10 | SUFFIX= 11 | fi 12 | 13 | # Since there is no sane way to get the parsed apache2 config in scripts, some 14 | # settings are defined via environment variables and then used in apache2ctl, 15 | # /etc/init.d/apache2, /etc/logrotate.d/apache2, etc. 16 | export APACHE_RUN_USER=web 17 | export APACHE_RUN_GROUP=www-data 18 | # temporary state file location. This might be changed to /run in Wheezy+1 19 | export APACHE_PID_FILE=/var/run/apache2/apache2$SUFFIX.pid 20 | export APACHE_RUN_DIR=/var/run/apache2$SUFFIX 21 | export APACHE_LOCK_DIR=/var/lock/apache2$SUFFIX 22 | # Only /var/log/apache2 is handled by /etc/logrotate.d/apache2. 23 | export APACHE_LOG_DIR=/var/log/apache2$SUFFIX 24 | 25 | ## The locale used by some modules like mod_dav 26 | export LANG=C 27 | ## Uncomment the following line to use the system default locale instead: 28 | #. /etc/default/locale 29 | 30 | export LANG 31 | 32 | ## The command to get the status for 'apache2ctl status'. 33 | ## Some packages providing 'www-browser' need '--dump' instead of '-dump'. 34 | #export APACHE_LYNX='www-browser -dump' 35 | 36 | ## If you need a higher file descriptor limit, uncomment and adjust the 37 | ## following line (default is 8192): 38 | #APACHE_ULIMIT_MAX_FILES='ulimit -n 65536' 39 | 40 | ## If you would like to pass arguments to the web server, add them below 41 | ## to the APACHE_ARGUMENTS environment. 42 | #export APACHE_ARGUMENTS='' 43 | 44 | ## Enable the debug mode for maintainer scripts. 45 | ## This will produce a verbose output on package installations of web server modules and web application 46 | ## installations which interact with Apache 47 | #export APACHE2_MAINTSCRIPT_DEBUG=1 48 | -------------------------------------------------------------------------------- /8.1/core/msmtprc.conf: -------------------------------------------------------------------------------- 1 | defaults 2 | tls off 3 | tls_certcheck off 4 | tls_starttls off 5 | 6 | account default 7 | host MY_SMTP 8 | #modified 9 | port 1025 10 | 11 | auto_from off 12 | from MY_OUTGOING_ADDRESS 13 | maildomain MY_EMAIL_DOMAIN 14 | -------------------------------------------------------------------------------- /8.1/core/other-vhosts-access-log.conf: -------------------------------------------------------------------------------- 1 | # Define an access log for VirtualHosts that don't define their own logfile 2 | #CustomLog ${APACHE_LOG_DIR}/other_vhosts_access.log vhost_combined 3 | 4 | # vim: syntax=apache ts=4 sw=4 sts=4 sr noet 5 | -------------------------------------------------------------------------------- /8.1/core/php-smtp.ini: -------------------------------------------------------------------------------- 1 | ; This ini file sets the php sendmail path to ssmtp. Nothing more. 2 | 3 | [mail function] 4 | sendmail_path = /usr/bin/msmtp -C /usr/local/etc/msmtprc -t -------------------------------------------------------------------------------- /8.2/config/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 web 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 | SSLProtocol all -SSLv3 -TLSv1 -TLSv1.1 23 | SSLCipherSuite ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256 24 | 25 | 26 | 27 | Options FollowSymLinks 28 | AllowOverride None 29 | Require all denied 30 | 31 | 32 | 33 | AllowOverride All 34 | Require all granted 35 | 36 | 37 | 38 | ServerName localhost 39 | ServerAlias localhost 40 | DocumentRoot "/var/www/html/MYDOCUMENTROOT" 41 | 42 | Options Indexes FollowSymLinks MultiViews 43 | AllowOverride All 44 | Order allow,deny 45 | Allow from all 46 | 47 | #ErrorLog /var/log/apache2/error.log 48 | #LogLevel error 49 | SetEnvIf Remote_Addr "127\.0\.0\.1" loopback 50 | #CustomLog /var/log/apache2/access.log combined env=!loopback 51 | ServerSignature On 52 | 53 | 54 | AccessFileName .htaccess 55 | 56 | Require all denied 57 | 58 | 59 | LogFormat "%v:%p %{X-Forwarded-For}i %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined 60 | LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined 61 | LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %O" common 62 | LogFormat "%{Referer}i -> %U" referer 63 | LogFormat "%{User-agent}i" agent 64 | 65 | 66 | CustomLog /proc/self/fd/1 combined 67 | 68 | 69 | SetHandler application/x-httpd-php 70 | 71 | 72 | # Multiple DirectoryIndex directives within the same context will add 73 | # to the list of resources to look for rather than replace 74 | # https://httpd.apache.org/docs/current/mod/mod_dir.html#directoryindex 75 | DirectoryIndex disabled 76 | DirectoryIndex index.php index.html 77 | 78 | IncludeOptional conf-enabled/*.conf 79 | IncludeOptional sites-enabled/*.conf 80 | -------------------------------------------------------------------------------- /8.2/config/bashrc: -------------------------------------------------------------------------------- 1 | alias ll='ls -al' 2 | 3 | function xdebug() { 4 | xdb_usage() { echo "usage xdebug: on|off" 1>&2; } 5 | 6 | case "$1" in 7 | on) 8 | sudo sed -i 's/^;*\(.*xdebug\.so\)/\1/' /usr/local/etc/php/php.ini 9 | sudo service apache2 reload > /dev/null 10 | echo "xdebug on"; 11 | ;; 12 | off) 13 | 14 | sudo sed -i 's/^\(.*xdebug\.so\)/;\1/' /usr/local/etc/php/php.ini 15 | sudo service apache2 reload > /dev/null 16 | echo "xdebug off"; 17 | ;; 18 | *) 19 | xdb_usage 20 | esac 21 | } -------------------------------------------------------------------------------- /8.2/core/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | set -e 3 | 4 | # Apache2 custom servername, alias and documentroot 5 | sed -i "s/MYSERVERNAME/$SERVERNAME/g" /etc/apache2/apache2.conf 6 | sed -i "s/MYSERVERALIAS/$SERVERALIAS/g" /etc/apache2/apache2.conf 7 | sed -i "s/MYDOCUMENTROOT/$DOCUMENTROOT/g" /etc/apache2/apache2.conf 8 | 9 | # Configure msmtp 10 | sed -i "s/MY_SMTP/$SMTP/g" /usr/local/etc/msmtprc 11 | sed -i "s/MY_EMAIL_DOMAIN/$EMAIL_DOMAIN/g" /usr/local/etc/msmtprc 12 | sed -i "s/MY_OUTGOING_ADDRESS/$OUTGOING_ADDRESS/g" /usr/local/etc/msmtprc 13 | 14 | # If docker secret ssh_public_key exists copy it in /var/www/.ssh 15 | if [ -f /run/secrets/ssh_public_key ]; then 16 | echo "Using secret ssh_public_key" 17 | cp /run/secrets/ssh_public_key /var/www/.ssh/id_rsa.pub 18 | chown -R web:www-data /var/www/.ssh 19 | fi 20 | 21 | # If docker secret ssh_private_key exists copy it in /var/www/.ssh 22 | if [ -f /run/secrets/ssh_private_key ]; then 23 | echo "Using secret ssh_private_key" 24 | cp /run/secrets/ssh_private_key /var/www/.ssh/id_rsa 25 | chmod 600 /var/www/.ssh/id_rsa 26 | chown -R web:www-data /var/www/.ssh 27 | fi 28 | 29 | # Set the apache user and group to match the host user. 30 | # This script will change the web UID/GID in the container from to 999 (default) to the UID/GID of the host user, if the current host user is not root. 31 | OWNER=$(stat -c '%u' /var/www/html) 32 | GROUP=$(stat -c '%g' /var/www/html) 33 | USERNAME=web 34 | [ -e "/etc/debian_version" ] || USERNAME=apache 35 | if [ "$OWNER" != "0" ]; then 36 | usermod -o -u $OWNER $USERNAME 37 | groupmod -o -g $GROUP www-data 38 | fi 39 | 40 | # set msmtp permissions 41 | chmod 600 /usr/local/etc/msmtprc && chown web /usr/local/etc/msmtprc 42 | 43 | # Apache gets grumpy about PID files pre-existing 44 | rm -f /var/run/apache2/apache2.pid 45 | 46 | # Start Apache in foreground 47 | /usr/sbin/apache2 -DFOREGROUND 48 | -------------------------------------------------------------------------------- /8.2/core/envvars: -------------------------------------------------------------------------------- 1 | # envvars - default environment variables for apache2ctl 2 | 3 | # this won't be correct after changing uid 4 | unset HOME 5 | 6 | # for supporting multiple apache2 instances 7 | if [ "${APACHE_CONFDIR##/etc/apache2-}" != "${APACHE_CONFDIR}" ] ; then 8 | SUFFIX="-${APACHE_CONFDIR##/etc/apache2-}" 9 | else 10 | SUFFIX= 11 | fi 12 | 13 | # Since there is no sane way to get the parsed apache2 config in scripts, some 14 | # settings are defined via environment variables and then used in apache2ctl, 15 | # /etc/init.d/apache2, /etc/logrotate.d/apache2, etc. 16 | export APACHE_RUN_USER=web 17 | export APACHE_RUN_GROUP=www-data 18 | # temporary state file location. This might be changed to /run in Wheezy+1 19 | export APACHE_PID_FILE=/var/run/apache2/apache2$SUFFIX.pid 20 | export APACHE_RUN_DIR=/var/run/apache2$SUFFIX 21 | export APACHE_LOCK_DIR=/var/lock/apache2$SUFFIX 22 | # Only /var/log/apache2 is handled by /etc/logrotate.d/apache2. 23 | export APACHE_LOG_DIR=/var/log/apache2$SUFFIX 24 | 25 | ## The locale used by some modules like mod_dav 26 | export LANG=C 27 | ## Uncomment the following line to use the system default locale instead: 28 | #. /etc/default/locale 29 | 30 | export LANG 31 | 32 | ## The command to get the status for 'apache2ctl status'. 33 | ## Some packages providing 'www-browser' need '--dump' instead of '-dump'. 34 | #export APACHE_LYNX='www-browser -dump' 35 | 36 | ## If you need a higher file descriptor limit, uncomment and adjust the 37 | ## following line (default is 8192): 38 | #APACHE_ULIMIT_MAX_FILES='ulimit -n 65536' 39 | 40 | ## If you would like to pass arguments to the web server, add them below 41 | ## to the APACHE_ARGUMENTS environment. 42 | #export APACHE_ARGUMENTS='' 43 | 44 | ## Enable the debug mode for maintainer scripts. 45 | ## This will produce a verbose output on package installations of web server modules and web application 46 | ## installations which interact with Apache 47 | #export APACHE2_MAINTSCRIPT_DEBUG=1 48 | -------------------------------------------------------------------------------- /8.2/core/msmtprc.conf: -------------------------------------------------------------------------------- 1 | defaults 2 | tls off 3 | tls_certcheck off 4 | tls_starttls off 5 | 6 | account default 7 | host MY_SMTP 8 | #modified 9 | port 1025 10 | 11 | auto_from off 12 | from MY_OUTGOING_ADDRESS 13 | maildomain MY_EMAIL_DOMAIN 14 | -------------------------------------------------------------------------------- /8.2/core/other-vhosts-access-log.conf: -------------------------------------------------------------------------------- 1 | # Define an access log for VirtualHosts that don't define their own logfile 2 | #CustomLog ${APACHE_LOG_DIR}/other_vhosts_access.log vhost_combined 3 | 4 | # vim: syntax=apache ts=4 sw=4 sts=4 sr noet 5 | -------------------------------------------------------------------------------- /8.2/core/php-smtp.ini: -------------------------------------------------------------------------------- 1 | ; This ini file sets the php sendmail path to ssmtp. Nothing more. 2 | 3 | [mail function] 4 | sendmail_path = /usr/bin/msmtp -C /usr/local/etc/msmtprc -t --------------------------------------------------------------------------------