Skip to content

Commit

Permalink
Update to stretch base.
Browse files Browse the repository at this point in the history
  • Loading branch information
macropin committed Aug 10, 2018
1 parent 6cbe36c commit 2d5a96d
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 39 deletions.
42 changes: 22 additions & 20 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,31 +1,33 @@
FROM debian:jessie

MAINTAINER Andrew Cutler <andrew@panubo.com>
FROM debian:stretch

EXPOSE 80

# Install Requirements
RUN apt-get update && \
apt-get install -y apache2-mpm-prefork ca-certificates && \
apt-get install -y libapache2-mod-php5 php5 php5-gd php-pear php5-mysql php5-pgsql php5-sqlite php5-mcrypt php5-intl php5-ldap && \
apt-get install -y vim msmtp && \
# Install Pear Requirements
pear install mail_mime mail_mimedecode net_smtp net_idna2-beta auth_sasl net_sieve crypt_gpg && \
# Cleanup
rm -rf /var/lib/apt/lists/*
RUN apt-get update \
&& apt-get install -y ca-certificates msmtp \
&& apt-get install -y libapache2-mod-php7.0 php7.0 php7.0-gd php-pear php7.0-mysql php7.0-pgsql php7.0-sqlite php7.0-mcrypt php7.0-intl php7.0-ldap \
&& apt-get install -y vim wget \
# Install Pear Requirements
&& pear install mail_mime mail_mimedecode net_smtp net_idna2-beta auth_sasl net_sieve crypt_gpg \
# Cleanup
&& rm -rf /var/lib/apt/lists/*

# Install PHP Extras
RUN cd /tmp \
&& wget https://github.com/panubo/php-extras/archive/master.tar.gz \
&& tar --wildcards -C /usr/share/php/ -xvf master.tar.gz --strip 1 '*.php' \
&& rm -f /tmp/master.tar.gz

# Additional PHP preload scripts
COPY *.php /usr/share/php/
# Host Configuration
COPY apache2.conf /etc/apache2/apache2.conf
COPY mpm_prefork.conf /etc/apache2/mods-available/
COPY vhost.conf /etc/apache2/sites-available/
RUN rm /etc/apache2/conf-enabled/* /etc/apache2/sites-enabled/* && \
a2enmod vhost_alias mpm_prefork deflate rewrite expires headers php5 && \
a2ensite vhost.conf && \
sed -i -e 's@^;sendmail_path =.*@sendmail_path = /usr/bin/msmtp -t -i@g' /etc/php5/apache2/php.ini /etc/php5/cli/php.ini && \
sed -i -e 's@short_open_tag =.*@short_open_tag = On@g' /etc/php5/apache2/php.ini /etc/php5/cli/php.ini && \
mkdir -p /srv/www
COPY mvhost.conf /etc/apache2/sites-available/
RUN rm /etc/apache2/conf-enabled/* /etc/apache2/sites-enabled/* \
&& a2enmod vhost_alias mpm_prefork deflate rewrite expires headers php7.0 \
&& a2ensite mvhost.conf \
&& sed -i -e 's@^;sendmail_path =.*@sendmail_path = /usr/bin/msmtp -t -i@g' /etc/php/7.0/apache2/php.ini /etc/php/7.0/cli/php.ini \
&& sed -i -e 's@short_open_tag =.*@short_open_tag = On@g' /etc/php/7.0/apache2/php.ini /etc/php/7.0/cli/php.ini \
&& mkdir -p /srv/www

ADD entry.sh /
ENTRYPOINT ["/entry.sh"]
Expand Down
3 changes: 1 addition & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2015 Volt Grid Pty Ltd
Copyright (c) 2015-2018 Volt Grid Pty Ltd

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -19,4 +19,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
TAG := jessie
TAG := stetch
IMAGE := panubo/apache-mvh
REGISTRY := docker.io

Expand Down
10 changes: 0 additions & 10 deletions ProxyHelper_prepend.php

This file was deleted.

13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ Apache Mass Virtual Host for PHP and static HTML websites.

## Features

- Uses [debian](https://hub.docker.com/_/debian/) base image
- Uses [Debian](https://hub.docker.com/_/debian/) base image
- Thin Container. Optionally uses linked [MariaDB](https://hub.docker.com/_/mariadb/) and [SMTP](https://hub.docker.com/r/panubo/postfix/) containers for those services.
- Mod PHP5 enabled
- Mod PHP7.0 enabled
- Both "www" and "naked" domains are served from files found at `/srv/www/sitename`
- Mass virtual host. No additional configuration required to add additional domains. Just create the "sitename"
directory and the contents will be automatically served.
directory and the contents will be automatically served for the "sitename" domain.

## Environment variables

Expand All @@ -18,11 +18,11 @@ SMTP Setting:
- `SMTP_PORT`
- `SMTP_HOST`

or `--link` your smtp container. msmtp is used for mail delivery. So PHP `mail()` function works without configuration changes.
or `--link` your smtp container. `msmtp` is used for mail delivery. So PHP `mail()` function works without configuration changes.

Proxy helper:

- `BEHIND_PROXY` - Default: False. Set to true to preload `ProxyHelper_prepend.php` which will register
- `BEHIND_PROXY` - Default: False. Set to true to preload [`ProxyHelper_prepend.php`](https://github.com/panubo/php-extras/blob/master/SSLHelper_prepend.php) which will register
the remote IP and SSL status (when using compatible X- proxy headers).

Apache MPM Tuning:
Expand All @@ -35,4 +35,5 @@ Apache MPM Tuning:

## Status

Production ready.
Jessie base is production ready.
Stretch base in testing.
File renamed without changes.

0 comments on commit 2d5a96d

Please sign in to comment.