2016-12-23 12:56:49 -05:00
|
|
|
FROM php:apache
|
|
|
|
|
|
|
|
RUN apt-get update && apt-get install -y \
|
|
|
|
libfreetype6-dev \
|
|
|
|
libjpeg62-turbo-dev \
|
2018-02-20 05:08:30 -05:00
|
|
|
libpng-dev \
|
2016-12-23 12:56:49 -05:00
|
|
|
wget \
|
|
|
|
zip \
|
2018-02-20 04:58:07 -05:00
|
|
|
unzip && \
|
2016-12-23 12:56:49 -05:00
|
|
|
# We install and enable php-gd
|
2018-02-20 04:58:07 -05:00
|
|
|
docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ &&\
|
|
|
|
docker-php-ext-install -j$(nproc) gd && \
|
2016-12-23 12:56:49 -05:00
|
|
|
# We enable Apache's mod_rewrite
|
|
|
|
a2enmod rewrite
|
|
|
|
|
2018-02-20 06:12:32 -05:00
|
|
|
|
|
|
|
# Copy app content
|
2018-02-20 04:59:04 -05:00
|
|
|
COPY . /var/www/html
|
2018-02-20 06:12:32 -05:00
|
|
|
|
|
|
|
# Copy start script
|
2018-02-20 06:23:52 -05:00
|
|
|
RUN mv /var/www/html/docker/entrypoint.sh / && \
|
|
|
|
rm -r /var/www/html/docker
|
|
|
|
|
2018-02-20 06:12:32 -05:00
|
|
|
VOLUME /var/www/html/data
|
|
|
|
|
|
|
|
CMD /entrypoint.sh
|