Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- FROM php:7.2-apache
- LABEL maintainer="xxx@yyy.com"
- ENV PHP_EXTRA_CONFIGURE_ARGS="--enable-mailparse"
- # Install packages
- RUN apt-get update && apt-get install -y \
- libfreetype6-dev \
- libjpeg62-turbo-dev \
- libmcrypt-dev \
- libpng-dev \
- nano \
- libc-client-dev libkrb5-dev \
- && apt-get clean \
- && rm -rf /var/lib/apt/lists/* \
- && docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
- && docker-php-ext-install -j$(nproc) gd \
- && pecl config-set php_ini "${PHP_INI_DIR}/php.ini" \
- && pecl install mailparse \
- && docker-php-ext-enable mailparse \
- && docker-php-ext-configure imap --with-kerberos --with-imap-ssl \
- && docker-php-ext-install imap \
- && yes | pecl install xdebug \
- && echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini \
- && docker-php-ext-install mysqli \
- && pecl install mcrypt-1.0.1 \
- && docker-php-ext-enable mcrypt
- # Enable apache mods.
- 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
- # Replace container php.ini by custom one
- COPY config/php.ini /usr/local/etc/php/
- # Construct server files inside container
- COPY app/ /var/www/html/
- # Set folder permission
- RUN chown -R www-data:www-data /var/www/html/
- # Expose Apache and xDebug
- EXPOSE 80
- EXPOSE 9000
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement