61 lines
1.9 KiB
Docker
61 lines
1.9 KiB
Docker
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
|
|
RUN curl -o wkhtmltox.tar.xz -SL https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz \
|
|
&& echo '3f923f425d345940089e44c1466f6408b9619562 wkhtmltox.tar.xz' | sha1sum -c - \
|
|
&& tar xvf wkhtmltox.tar.xz \
|
|
&& cp wkhtmltox/lib/* /usr/local/lib/ \
|
|
&& cp wkhtmltox/bin/* /usr/local/bin/ \
|
|
&& cp -r wkhtmltox/share/man/man1 /usr/local/share/man/
|
|
|
|
# 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
|
|
ENV FLECTRA_BRANCH 1.0
|
|
WORKDIR /opt/flectra
|
|
# Default user
|
|
USER flectra
|
|
RUN mkdir pipcache data backups extra-addons custom-addons
|
|
RUN git clone -b ${FLECTRA_BRANCH} --depth 1 https://gitlab.com/flectra-hq/flectra
|
|
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" ]
|