2018-11-06 17:32:00 +01:00
|
|
|
FROM debian:stretch
|
|
|
|
MAINTAINER Yaltik - Fabien Bourgeois <fabien@yaltik.com>
|
|
|
|
|
|
|
|
# http://bugs.python.org/issue19846
|
|
|
|
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
|
|
|
|
ENV LANG C.UTF-8
|
|
|
|
|
|
|
|
# Flectra dependencies from Debian APT repository
|
|
|
|
RUN apt-get update \
|
|
|
|
&& apt-get install -y --no-install-recommends \
|
|
|
|
build-essential git mercurial curl \
|
|
|
|
libxml2-dev libxslt1-dev libldap2-dev libsasl2-dev libjpeg-dev libpq-dev \
|
|
|
|
libfreetype6-dev libssl1.0-dev \
|
|
|
|
python3-dev python3-setuptools python3-pip \
|
|
|
|
nodejs node-less xz-utils \
|
|
|
|
postgresql-client-9.6
|
|
|
|
|
|
|
|
# Handle Node PATH
|
|
|
|
RUN ln -s /usr/bin/nodejs /usr/bin/node
|
|
|
|
|
|
|
|
# WKHTMLTOPDF and fonts
|
2018-11-07 07:28:43 +01:00
|
|
|
RUN curl -o wkhtmltox.deb -SL https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.stretch_amd64.deb \
|
|
|
|
&& echo '7e35a63f9db14f93ec7feeb0fce76b30c08f2057 wkhtmltox.deb' | sha1sum -c \
|
|
|
|
&& dpkg --force-depends -i wkhtmltox.deb \
|
|
|
|
&& apt-get -y --fix-broken install
|
2018-11-06 17:32:00 +01:00
|
|
|
|
|
|
|
# Packages cleanup
|
|
|
|
RUN apt-get purge -y --auto-remove \
|
|
|
|
&& apt-get clean \
|
|
|
|
&& rm -r ./wkhtmltox*
|
|
|
|
|
|
|
|
# Create flectra user
|
|
|
|
RUN useradd flectra -md /opt/flectra
|
|
|
|
|
|
|
|
# Install Flectra 1.0 latest
|
2018-11-14 08:10:34 +01:00
|
|
|
ENV FLECTRA_BRANCH yaltik_1.0
|
2018-11-06 17:32:00 +01:00
|
|
|
WORKDIR /opt/flectra
|
|
|
|
# Default user
|
|
|
|
USER flectra
|
|
|
|
RUN mkdir pipcache data backups extra-addons custom-addons
|
2018-11-08 17:08:11 +01:00
|
|
|
RUN git clone -b ${FLECTRA_BRANCH} --depth 1 https://git.yaltik.net/Yaltik/flectra.git
|
2018-11-06 17:32:00 +01:00
|
|
|
RUN pip3 install --user -U pip
|
|
|
|
RUN .local/bin/pip3 install --user -r flectra/requirements.txt
|
|
|
|
|
|
|
|
# Launch scripts
|
|
|
|
COPY ./launch.sh ./
|
|
|
|
COPY ./genconf.sh ./
|
|
|
|
|
|
|
|
# Post-install tasks
|
|
|
|
RUN touch flectra.conf
|
|
|
|
|
|
|
|
# Flectra default ports
|
|
|
|
EXPOSE 7072 7073
|
|
|
|
|
|
|
|
# Volumes : data dir for filestore and addons
|
|
|
|
VOLUME /opt/flectra/data
|
|
|
|
|
|
|
|
CMD [ "bash", "launch.sh" ]
|