DockerLamp/bin/php56/Dockerfile

55 lines
2.0 KiB
Docker

FROM php:5.6-apache
# Backup and clean source.list file
RUN cp /etc/apt/sources.list /etc/apt/sources.list.old && \
cat /dev/null > /etc/apt/sources.list
# Fix the source.list for stretch
RUN printf "deb http://archive.debian.org/debian/ stretch main\n" > /etc/apt/sources.list && \
printf "deb-src http://archive.debian.org/debian/ stretch main\n" >> /etc/apt/sources.list && \
printf "deb http://archive.debian.org/debian-security stretch/updates main\n" >> /etc/apt/sources.list && \
printf "deb-src http://archive.debian.org/debian-security stretch/updates main" >> /etc/apt/sources.list
RUN apt-get -y update && apt-get upgrade -y
# Install tools && libraries
RUN apt-get -y install --fix-missing nano wget dialog \
build-essential git curl libcurl3 libcurl3-dev zip \
libmcrypt-dev libsqlite3-dev libsqlite3-0 mysql-client \
zlib1g-dev libicu-dev libfreetype6-dev libjpeg62-turbo-dev libpng-dev \
&& rm -rf /var/lib/apt/lists/*
# Composer
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
# PHP5 Extensions
RUN docker-php-ext-install curl \
&& docker-php-ext-install tokenizer \
&& docker-php-ext-install json \
&& docker-php-ext-install bcmath \
&& docker-php-ext-install mcrypt \
&& docker-php-ext-install pdo_mysql \
&& docker-php-ext-install pdo_sqlite \
&& docker-php-ext-install mysqli \
&& docker-php-ext-install zip \
&& docker-php-ext-install -j$(nproc) intl \
&& docker-php-ext-install mbstring \
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
&& docker-php-ext-install -j$(nproc) gd \
&& pecl install xdebug-2.5.5 && docker-php-ext-enable xdebug \
&& echo "xdebug.remote_enable=1" >> /usr/local/etc/php/php.ini
# Insure an SSL directory exists
RUN mkdir -p /etc/apache2/ssl
# Enable SSL support
RUN a2enmod ssl && a2enmod rewrite
# Enable apache modules
RUN a2enmod rewrite headers
EXPOSE 80
EXPOSE 443
ENTRYPOINT ["/usr/sbin/apache2ctl", "-D", "FOREGROUND"]