php:5.6-apache + php extensions: phpredis, gd, pdo_mysql + apache mod_rewrite + mysql-client
1.2K
FROM php:5.6-apache
LABEL maintainer apotek
# Add pdo_mysql, gd, imagemagic support
RUN apt-get update && apt-get install -y \
libfreetype6-dev \
libjpeg62-turbo-dev \
libmcrypt-dev \
libpng12-dev \
&& docker-php-ext-install pdo_mysql \
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
&& docker-php-ext-install gd
# Add PHPRedis support
RUN apt-get update && apt-get install -y mysql-client wget unzip
WORKDIR /tmp
RUN wget https://github.com/phpredis/phpredis/archive/2.2.7.zip
RUN unzip 2.2.7.zip
WORKDIR phpredis-2.2.7
RUN phpize
RUN ./configure
RUN make && make install
RUN cp modules/redis.so /usr/local/lib/php/extensions/no-debug-non-zts-20131226
RUN echo "extension=redis.so" > /usr/local/etc/php/conf.d/redis.ini
# Enable mod rewrite
WORKDIR /etc/apache2/mods-enabled
RUN ln -s ../mods-available/rewrite.load rewrite.load
WORKDIR /etc/apache2
# On OS X, a shared docker data volume will be unwritable
# by www-data user, given default uids, meaning apache can’t
# write to shared files. So we modify the uid
# See https://github.com/boot2docker/boot2docker/issues/581
RUN usermod -u 1000 www-data
# This group mod has not been tested yet. remove if it breaks things.
RUN usermod -G staff www-data
RUN chown -R www-data:www-data /var/run/apache2
RUN chown -R www-data:www-data /run/lock/apache2
Content type
Image
Digest
sha256:c66bc0903…
Size
192.6 MB
Last updated
about 8 years ago
docker pull apotek/php-apache