Dockerfile 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. #Partially from Odoo's dockerfile
  2. #github.com/odoo/docker
  3. FROM debian:stretch
  4. MAINTAINER FlectraHQ <flectra@flectrahq.com>
  5. # Generate locale C.UTF-8 for postgres and general locale data
  6. ENV LANG C.UTF-8
  7. ENV FLECTRA_VERSION=1.4
  8. ENV FLECTRA_RELEASE=latest
  9. # Install some deps, lessc and less-plugin-clean-css, and wkhtmltopdf
  10. RUN set -x; \
  11. apt-get update \
  12. && apt-get install -y --no-install-recommends \
  13. ca-certificates \
  14. curl \
  15. gcc \
  16. libsasl2-dev \
  17. libldap2-dev \
  18. node-less \
  19. python3-dev \
  20. python3-pip \
  21. python3-setuptools \
  22. python3-renderpm \
  23. libssl1.0-dev \
  24. xz-utils \
  25. && 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 \
  26. && echo '3f923f425d345940089e44c1466f6408b9619562 wkhtmltox.tar.xz' | sha1sum -c - \
  27. && tar xvf wkhtmltox.tar.xz \
  28. && cp wkhtmltox/lib/* /usr/local/lib/ \
  29. && cp wkhtmltox/bin/* /usr/local/bin/ \
  30. && cp -r wkhtmltox/share/man/man1 /usr/local/share/man/
  31. # Install Flectra Dependencies and WDB Debugger
  32. RUN set -x; \
  33. pip3 install -r https://gitlab.com/flectra-hq/flectra/raw/v${FLECTRA_VERSION}.0/requirements.txt \
  34. && pip3 install --no-cache-dir wdb watchdog
  35. ENV MQT_URI="https://gitlab.com/arkhan/developer-quality-tools/-/archive/master/developer-quality-tools-master.tar.gz"
  36. RUN curl -sL "$MQT_URI" | tar -xz -C /opt/ \
  37. && ln -sf /opt/developer-quality-tools-*/gitlab-ci/clone_module_dependencies /usr/bin \
  38. && ln -sf /opt/developer-quality-tools-*/gitlab-ci/getaddons.py /usr/bin \
  39. && chmod +x /usr/bin/getaddons.py
  40. # Copy entrypoint script and Flectra configuration file
  41. COPY ./entrypoint.sh /
  42. RUN adduser --system --quiet --shell=/bin/false --group flectra
  43. #RUN chown flectra /etc/flectra/flectra.conf
  44. RUN chmod +x /entrypoint.sh
  45. # Mount /var/lib/flectra to allow restoring filestore and /mnt/extra-addons for users addons
  46. RUN mkdir -p /mnt/repos \
  47. && chown -R flectra /mnt/repos
  48. VOLUME ["/var/lib/flectra", "/mnt/repos"]
  49. # Expose Flectra services
  50. EXPOSE 7073 7072
  51. # Set the default config file
  52. ENV FLECTRA_RC /etc/flectra/flectra.conf
  53. # Set default user when running the container
  54. USER flectra
  55. ENTRYPOINT ["/entrypoint.sh"]
  56. CMD ["flectra"]