76243dc2 by Jeff Balicki

dockerfiles

1 parent 0a3caeea
FROM php:5.6-apache
# Enable apache mods.
RUN a2enmod php5
RUN a2enmod rewrite
# Manually set up the apache environment variables
ENV APACHE_RUN_USER www-data
ENV APACHE_RUN_GROUP www-data
ENV APACHE_LOG_DIR /var/log/apache2
ENV APACHE_LOCK_DIR /var/lock/apache2
ENV APACHE_PID_FILE /var/run/apache2.pid
# Update the default apache site with the config we created.
ADD apache-config.conf /etc/apache2/sites-available/000-default.conf
RUN a2ensite 000-default
\ No newline at end of file
<VirtualHost *:80>
ServerAdmin me@mydomain.com
DocumentRoot /var/www/html
<Directory /var/www/html/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
\ No newline at end of file
#!/bin/bash
set -e
ext="$1"
extDir="/usr/src/php/ext/$ext"
if [ -z "$ext" -o ! -d "$extDir" ]; then
echo >&2 "usage: $0 ext-name [configure flags]"
echo >&2 " ie: $0 gd --with-jpeg-dir=/usr/local/something"
echo >&2
echo >&2 'Possible values for ext-name:'
echo >&2 $(find /usr/src/php/ext -mindepth 2 -maxdepth 2 -type f$
exit 1
fi
shift
set -x
cd "$extDir"
phpize
./configure "$@"
\ No newline at end of file
#!/bin/bash
set -e
cd /usr/src/php/ext
usage() {
echo "usage: $0 ext-name [ext-name ...]"
echo " ie: $0 gd mysqli"
echo " $0 pdo pdo_mysql"
echo
echo 'if custom ./configure arguments are necessary, see docker-$
echo
echo 'Possible values for ext-name:'
echo $(find /usr/src/php/ext -mindepth 2 -maxdepth 2 -type f -na$
}
exts=()
while [ $# -gt 0 ]; do
ext="$1"
shift
if [ -z "$ext" ]; then
continue
fi
if [ ! -d "$ext" ]; then
echo >&2 "error: $(pwd -P)/$ext does not exist"
echo >&2
usage >&2
exit 1
fi
exts+=( "$ext" )
done
if [ "${#exts[@]}" -eq 0 ]; then
usage >&2
exit 1
fi
for ext in "${exts[@]}"; do
(
cd "$ext"
[ -e Makefile ] || docker-php-ext-configure "$ext"
make
make install
ini="/usr/local/etc/php/conf.d/docker-php-ext-$ext.ini"
for module in modules/*.so; do
if [ -f "$module" ]; then
if grep -q zend_extension_entry "$module$
# https://wiki.php.net/internals$
line="zend_extension=$(basename $
else
line="extension=$(basename "$mod$
fi
if ! grep -q "$line" "$ini"; then
echo "$line" >> "/usr/local/etc/$
fi
fi
done
make clean
)
done
\ No newline at end of file