FROM php:7.2.15-apache-stretch MAINTAINER Anthony # Add build args for uid/gid with default ARG DOCKER_UID=1000 ARG DOCKER_GID=1000 # Set up environment variables ENV ADD_CONTENT_LENGTH_HEADER=0 ENV DISPLAY_ERRORS=1 ENV LOG_LEVEL=100 ENV VIEW_DEBUG=1 ENV VIEW_AUTO_RELOAD=1 ENV CACHE_ROUTES=0 ENV DB_NAME=sample ENV DB_HOST=your.db.host ENV DB_USER=mysqluser ENV DB_PASS=password ENV SESSION_DOMAIN=localhost ENV SECURE_SESSION_COOKIE=0 ENV STRICT_TRANSPORT_AGE=0 # Add mysql-client, PHP extensions and enable RUN apt-get update && apt-get install -y strace mysql-client zlib1g-dev libicu-dev g++ \ && pecl install xdebug-2.8.0 redis-4.3.0 \ && docker-php-ext-configure intl \ && docker-php-ext-install pdo_mysql pcntl intl \ && docker-php-ext-enable xdebug redis # Add Apache vhost, disable default, enable new vhost, enable apache modules & create and chown cache and spool dirs. COPY vhost.conf /etc/apache2/sites-available/ RUN a2dissite 000-default.conf \ && a2ensite vhost \ && a2enmod rewrite \ && usermod -u ${DOCKER_UID} www-data \ && groupmod -g ${DOCKER_GID} www-data \ && mkdir -p /var/cache/mr/ \ && chown -R www-data:www-data /var/cache/mr/ /var/www/html COPY mem_limit.ini ${PHP_INI_DIR}/conf.d/mem_limit.ini COPY session.ini ${PHP_INI_DIR}/conf.d/session.ini COPY xdebug.ini ${PHP_INI_DIR}/conf.d/xdebug.ini