2016-10-26 08:01:55 -05:00
|
|
|
FROM php:7-apache
|
|
|
|
|
|
|
|
RUN apt-get update -y && \
|
|
|
|
apt-get install -y --no-install-recommends libcurl4-openssl-dev \
|
|
|
|
zlib1g-dev \
|
|
|
|
libjpeg62-turbo-dev \
|
|
|
|
libpng12-dev \
|
|
|
|
libicu-dev \
|
|
|
|
libmcrypt-dev \
|
|
|
|
libedit-dev \
|
|
|
|
libtidy-dev \
|
|
|
|
libxml2-dev \
|
|
|
|
libsqlite3-dev \
|
2017-06-05 17:22:09 -05:00
|
|
|
libpq-dev \
|
2017-01-11 17:30:33 -06:00
|
|
|
libbz2-dev \
|
2017-02-10 21:33:20 -06:00
|
|
|
gettext-base \
|
2017-01-11 17:30:33 -06:00
|
|
|
locales && \
|
2016-10-26 08:01:55 -05:00
|
|
|
apt-get clean && \
|
|
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
|
2017-06-05 17:22:09 -05:00
|
|
|
RUN docker-php-ext-install -j$(nproc) curl gd intl json mcrypt readline tidy zip bcmath xml mbstring pdo_sqlite pdo_mysql bz2 pdo_pgsql
|
2016-10-26 08:01:55 -05:00
|
|
|
|
2017-01-11 17:30:33 -06:00
|
|
|
# Generate locales supported by firefly
|
|
|
|
RUN echo "en_US.UTF-8 UTF-8\nde_DE.UTF-8 UTF-8\nnl_NL.UTF-8 UTF-8\npt_BR.UTF-8 UTF-8" > /etc/locale.gen && locale-gen
|
|
|
|
|
2017-09-09 05:46:35 -05:00
|
|
|
COPY ./docker/apache2.conf /etc/apache2/apache2.conf
|
|
|
|
|
2016-10-26 08:01:55 -05:00
|
|
|
# Enable apache mod rewrite..
|
|
|
|
RUN a2enmod rewrite
|
|
|
|
|
2017-09-17 08:42:29 -05:00
|
|
|
# Enable apache mod ssl..
|
|
|
|
RUN a2enmod ssl
|
|
|
|
|
2016-10-26 08:01:55 -05:00
|
|
|
# Setup the Composer installer
|
2017-09-09 05:46:35 -05:00
|
|
|
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
|
2016-10-26 08:01:55 -05:00
|
|
|
|
2017-09-09 05:46:35 -05:00
|
|
|
# Copy Apache Configs
|
|
|
|
COPY ./docker/apache-firefly.conf /etc/apache2/sites-available/000-default.conf
|
2016-10-26 08:01:55 -05:00
|
|
|
|
2017-09-09 06:17:01 -05:00
|
|
|
ENV FIREFLY_PATH /var/www/firefly-iii
|
|
|
|
|
|
|
|
WORKDIR $FIREFLY_PATH
|
2017-09-09 05:46:35 -05:00
|
|
|
|
|
|
|
# The working directory
|
2017-09-09 06:17:01 -05:00
|
|
|
COPY . $FIREFLY_PATH
|
2017-09-09 05:46:35 -05:00
|
|
|
|
2017-09-09 06:17:01 -05:00
|
|
|
RUN chown -R www-data:www-data /var/www && chmod -R 775 $FIREFLY_PATH/storage
|
2017-09-09 05:46:35 -05:00
|
|
|
|
2017-10-11 03:07:09 -05:00
|
|
|
RUN composer install --prefer-dist --no-dev --no-scripts
|
2017-09-09 05:46:35 -05:00
|
|
|
|
2017-08-31 14:05:43 -05:00
|
|
|
EXPOSE 80
|
2017-09-09 05:46:35 -05:00
|
|
|
|
2017-09-09 06:17:01 -05:00
|
|
|
ENTRYPOINT ["docker/entrypoint.sh"]
|