2020-02-10 08:00:54 +00:00
|
|
|
FROM bitnami/python:latest-prod
|
|
|
|
|
|
|
|
RUN useradd -ms /bin/bash frappe
|
|
|
|
WORKDIR /home/frappe/frappe-bench
|
|
|
|
RUN install_packages \
|
|
|
|
git \
|
|
|
|
wkhtmltopdf \
|
|
|
|
mariadb-client \
|
|
|
|
gettext-base \
|
|
|
|
wget \
|
|
|
|
# for PDF
|
|
|
|
libssl-dev \
|
|
|
|
fonts-cantarell \
|
|
|
|
xfonts-75dpi \
|
|
|
|
xfonts-base \
|
|
|
|
# For psycopg2
|
|
|
|
libpq-dev \
|
|
|
|
build-essential
|
|
|
|
|
|
|
|
# Install wkhtmltox correctly
|
2020-05-19 06:40:09 +00:00
|
|
|
RUN wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.buster_amd64.deb
|
|
|
|
RUN dpkg -i wkhtmltox_0.12.5-1.buster_amd64.deb && rm wkhtmltox_0.12.5-1.buster_amd64.deb
|
2020-02-10 08:00:54 +00:00
|
|
|
|
2020-03-27 11:11:32 +00:00
|
|
|
RUN mkdir -p apps logs commands /home/frappe/backups
|
2020-02-10 08:00:54 +00:00
|
|
|
|
|
|
|
RUN virtualenv env \
|
|
|
|
&& . env/bin/activate \
|
|
|
|
&& cd apps \
|
|
|
|
&& git clone --depth 1 -o upstream https://github.com/frappe/frappe --branch version-12 \
|
2020-02-17 15:05:50 +00:00
|
|
|
&& pip3 install --no-cache-dir -e /home/frappe/frappe-bench/apps/frappe
|
2020-02-10 08:00:54 +00:00
|
|
|
|
2020-02-20 12:31:23 +00:00
|
|
|
COPY build/common/commands/* /home/frappe/frappe-bench/commands/
|
|
|
|
COPY build/common/common_site_config.json.template /opt/frappe/common_site_config.json.template
|
2020-02-10 08:00:54 +00:00
|
|
|
|
|
|
|
# Setup docker-entrypoint
|
2020-02-20 12:31:23 +00:00
|
|
|
COPY build/common/worker/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
|
2020-02-10 08:00:54 +00:00
|
|
|
RUN ln -s /usr/local/bin/docker-entrypoint.sh / # backwards compat
|
|
|
|
|
2020-03-04 02:52:36 +00:00
|
|
|
COPY build/common/worker/install_app.sh /usr/local/bin/install_app
|
|
|
|
|
2020-02-10 08:00:54 +00:00
|
|
|
WORKDIR /home/frappe/frappe-bench/sites
|
|
|
|
|
2020-03-27 11:11:32 +00:00
|
|
|
RUN chown -R frappe:frappe /home/frappe/frappe-bench/sites /home/frappe/backups
|
2020-03-17 17:01:37 +00:00
|
|
|
|
2020-03-27 11:11:32 +00:00
|
|
|
VOLUME [ "/home/frappe/frappe-bench/sites", "/home/frappe/backups" ]
|
2020-03-17 17:01:37 +00:00
|
|
|
|
2020-02-10 08:00:54 +00:00
|
|
|
ENTRYPOINT ["docker-entrypoint.sh"]
|
|
|
|
CMD ["start"]
|