Skip to content

Instantly share code, notes, and snippets.

@tocttou
Created May 26, 2017 14:21
Show Gist options
  • Save tocttou/4ed64104fc9cba716470e5624649db1b to your computer and use it in GitHub Desktop.
Save tocttou/4ed64104fc9cba716470e5624649db1b to your computer and use it in GitHub Desktop.
FROM php:7.0-apache
RUN apt update && \
apt install -y wget && \
cd /tmp && \
wget https://www.dotdeb.org/dotdeb.gpg && \
apt-key add dotdeb.gpg && \
rm dotdeb.gpg && \
echo "deb http://packages.dotdeb.org jessie all" >> /etc/apt/sources.list && \
apt update && \
apt install -y php7.0-mysql php7.0-xml && \
docker-php-ext-install mysqli pdo pdo_mysql && \
echo "\n<Directory /var/www/html>\nOptions Indexes FollowSymLinks\nAllowOverride All\nRequire all granted\n</Directory>" >> /etc/apache2/apache2.conf && \
a2enmod rewrite && a2enmod headers && a2enmod ssl && \
mkdir /certs && \
sed -i "s|/etc/ssl/certs/ssl-cert-snakeoil.pem|/certs/server.crt|g" /etc/apache2/sites-available/default-ssl.conf && \
sed -i "s|/etc/ssl/private/ssl-cert-snakeoil.key|/certs/server.key|g" /etc/apache2/sites-available/default-ssl.conf && \
a2ensite default-ssl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment