firefly-iii-app/Dockerfile
RoboMod 7404f3373f Fixed some bugs in Dockerfile
Found bug in CloudronManifest accourding hyphens in urls
2018-11-08 23:14:28 +01:00

86 lines
2.9 KiB
Docker

FROM cloudron/base:1.0.0@sha256:147a648a068a2e746644746bbfb42eb7a50d682437cead3c67c933c546357617
# Many lines are copied from https://github.com/firefly-iii/firefly-iii/blob/master/Dockerfile
ENV FIREFLY_VERSION 4.7.8
ENV FIREFLY_PATH /app/code
ENV CURL_VERSION 7.60.0
ENV OPENSSL_VERSION 1.1.1-pre6
ENV COMPOSER_ALLOW_SUPERUSER 1
LABEL version="1.0" maintainer="robomod@xeac.org"
## Prepare third parties
# Install packages
RUN apt-get update -y && \
apt-get install -y --no-install-recommends libjpeg-turbo8-dev \
libpng-dev \
libldap2-dev \
libedit-dev \
libtidy-dev \
libsqlite3-dev \
libbz2-dev \
cron \
rsyslog \
locales && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Install latest curl
RUN cd /tmp && \
wget https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz && \
tar -xvf openssl-${OPENSSL_VERSION}.tar.gz && \
cd openssl-${OPENSSL_VERSION} && \
./config && \
make -j${CORES} && \
make install
RUN cd /tmp && \
wget https://curl.haxx.se/download/curl-${CURL_VERSION}.tar.gz && \
tar -xvf curl-${CURL_VERSION}.tar.gz && \
cd curl-${CURL_VERSION} && \
./configure --with-ssl --host=$(gcc -dumpmachine) && \
make -j${CORES} && \
make install
# Make sure that libcurl is using the newer curl libaries
RUN echo "/usr/local/lib" >> /etc/ld.so.conf.d/00-curl.conf && ldconfig
# Fix the link to curl:
RUN rm -rf /usr/local/lib/libcurl.so.4 && ln -s /usr/lib/x86_64-linux-gnu/libcurl.so.4.4.0 /usr/local/lib/libcurl.so.4
## Configure system
# Generate locales supported by Firefly III
RUN echo "en_US.UTF-8 UTF-8\nde_DE.UTF-8 UTF-8\nfr_FR.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\n\n" > /etc/locale.gen && locale-gen
# Supervisor conf
ADD supervisor/ /etc/supervisor/conf.d/
# Enable apache mod rewrite and ssl
RUN a2enmod rewrite
RUN a2enmod ssl
# Firefly apache conf
ADD apache-firefly.conf /etc/apache2/sites-available/000-default.conf
# Start script
ADD start.sh /app/code/start.sh
## Install software
# Create app code directory
RUN mkdir -p /app/code
WORKDIR /app/code
# Get Firefly
RUN wget "https://github.com/firefly-iii/firefly-iii/archive/${FIREFLY_VERSION}.tar.gz" -O - \
| tar -xz -C /app/code --strip-components=1
# Run composer
RUN composer install --prefer-dist --no-dev --no-scripts --no-suggest
# Expose port
EXPOSE 3000
# Run start script
CMD [ "/app/code/start.sh" ]