firefly-iii/Dockerfile

53 lines
2.1 KiB
Docker
Raw Normal View History

2018-09-27 09:35:24 -05:00
FROM php:7.2-apache
2018-08-14 14:21:03 -05:00
2018-12-26 23:04:49 -06:00
ENV FIREFLY_PATH=/var/www/firefly-iii CURL_VERSION=7.60.0 OPENSSL_VERSION=1.1.1-pre6 COMPOSER_ALLOW_SUPERUSER=1
LABEL version="1.3" maintainer="thegrumpydictator@gmail.com"
2016-10-26 08:01:55 -05:00
2018-12-26 23:04:49 -06:00
# Create volumes
VOLUME $FIREFLY_PATH/storage/export $FIREFLY_PATH/storage/upload
2018-08-18 07:08:28 -05:00
2018-12-26 23:04:49 -06:00
# Install some stuff
RUN apt-get update && apt-get install -y libpng-dev \
libicu-dev \
unzip \
gettext-base \
libldap2-dev \
libpq-dev \
locales && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Copy in Firefly III source
WORKDIR $FIREFLY_PATH
ADD . $FIREFLY_PATH
2018-08-18 07:08:28 -05:00
2018-10-09 23:09:25 -05:00
# copy ca certs to correct location
COPY ./.deploy/docker/cacert.pem /usr/local/ssl/cert.pem
2018-08-14 14:21:03 -05:00
# copy Apache config to correct spot.
COPY ./.deploy/docker/apache2.conf /etc/apache2/apache2.conf
# Enable default site (Firefly III)
COPY ./.deploy/docker/apache-firefly.conf /etc/apache2/sites-available/000-default.conf
2018-12-26 23:04:49 -06:00
# Make sure we own Firefly III directory and enable rewrite + SSL
RUN chown -R www-data:www-data /var/www && chmod -R 775 $FIREFLY_PATH/storage && a2enmod rewrite && a2enmod ssl
2018-12-26 23:04:49 -06:00
# Install PHP exentions, install composer, update languages.
RUN docker-php-ext-install -j$(nproc) zip bcmath ldap gd pdo_pgsql pdo_mysql intl
# Install Composer
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
2018-08-15 07:43:49 -05:00
2018-12-26 23:04:49 -06:00
# Update language data.
RUN echo "de_DE.UTF-8 UTF-8\nen_US.UTF-8 UTF-8\nes_ES.UTF-8 UTF-8\nfr_FR.UTF-8 UTF-8\nid_ID.UTF-8 UTF-8\nit_IT.UTF-8 UTF-8\nnl_NL.UTF-8 UTF-8\npl_PL.UTF-8 UTF-8\npt_BR.UTF-8 UTF-8\nru_RU.UTF-8 UTF-8\ntr_TR.UTF-8 UTF-8\nzh_TW.UTF-8 UTF-8\n\n" > /etc/locale.gen && locale-gen
2018-09-03 07:51:15 -05:00
2017-12-15 02:16:41 -06:00
# Run composer
RUN composer install --prefer-dist --no-dev --no-scripts --no-suggest
2018-08-14 14:21:03 -05:00
# Expose port 80
EXPOSE 80
2018-08-14 14:21:03 -05:00
# Run entrypoint thing
2018-08-20 10:31:39 -05:00
ENTRYPOINT [".deploy/docker/entrypoint.sh"]