Skip to content

Instantly share code, notes, and snippets.

@w4tsn
Last active July 16, 2017 18:12
Show Gist options
  • Save w4tsn/0e40b971d7cf4cd7a35f3b3e951fe8b8 to your computer and use it in GitHub Desktop.
Save w4tsn/0e40b971d7cf4cd7a35f3b3e951fe8b8 to your computer and use it in GitHub Desktop.
Dockerfile for PHPBack
FROM php:5.6-apache
# Enable Apache Rewrite Module
RUN a2enmod rewrite
# Install PHP extensions
RUN apt-get update && apt-get install -y libpng12-dev libjpeg-dev libcurl4-gnutls-dev curl git php-pear php-apc \
&& rm -rf /var/lib/apt/lists/* \
&& docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr \
&& docker-php-ext-install gd \
&& docker-php-ext-install mysqli \
&& docker-php-ext-install curl \
&& docker-php-ext-install gettext
WORKDIR /var/www/html
RUN git clone https://github.com/ivandiazwm/phpback.git /var/www/html
RUN chown -vR www-data:www-data /var/www/html
COPY ressources/run.sh /run.sh
RUN chmod +x /run.sh
COPY ressources/php.ini /usr/local/etc/php/php.ini
COPY ressources/apache.conf /etc/apache2/sites-enabled/000-default.conf
CMD ["apache2ctl", "-DFOREGROUND"]
CMD ["/bin/bash /run.sh"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment