Dockerfile 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. FROM odoo:9.0
  2. USER root
  3. # Set the default config file
  4. ENV ODOO_CONFIG="/etc/odoo/odoo.conf"
  5. RUN ln -sf /usr/share/zoneinfo/America/Guayaquil /etc/localtime
  6. RUN apt-get update && \
  7. apt-get install -y python-pandas git make default-jdk default-jre locales xz-utils && \
  8. rm -rf /var/lib/apt/lists/* && \
  9. curl -sL https://bootstrap.pypa.io/get-pip.py >> /tmp/get-pip.py && \
  10. python /tmp/get-pip.py && \
  11. rm -rf /tmp/get-pip.py
  12. # Install wkhtmltopdf 0.12.4 (with patched qt)
  13. RUN curl -sL https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz --output /tmp/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz && \
  14. tar -xvf /tmp/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz -C /tmp && \
  15. mv -i /tmp/wkhtmltox/bin/wkhtmlto* /usr/bin/ && \
  16. ln -nfs /usr/bin/wkhtmltopdf /usr/local/bin/wkhtmltopdf && \
  17. rm -rf /tmp/wkhtmltox*
  18. RUN curl -sL https://github.com/ncopa/su-exec/archive/v0.2.tar.gz | tar -xz -C /tmp && \
  19. cd /tmp/su-exec-0.2 && make && mv su-exec /usr/bin
  20. # OCA Repos
  21. # https://github.com/OCA/maintainer-quality-tools/pull/404
  22. ENV MQT_URI="https://github.com/arkhan/maintainer-quality-tools/archive/master.tar.gz"
  23. RUN curl -sL "$MQT_URI" | tar -xz -C /opt/ \
  24. && ln -sf /opt/maintainer-quality-tools-*/travis/clone_oca_dependencies /usr/bin \
  25. && ln -sf /opt/maintainer-quality-tools-*/travis/getaddons.py /usr/bin \
  26. && chmod +x /usr/bin/getaddons.py
  27. # PUDB debugger
  28. RUN /usr/local/bin/pip install --no-cache-dir wdb watchdog
  29. COPY ./docker-entrypoint.sh /entrypoint.sh
  30. RUN chown odoo /entrypoint.sh && \
  31. chown -R odoo /etc/odoo && \
  32. chmod +x /entrypoint.sh
  33. RUN mkdir -p /opt/odoo && \
  34. mkdir -p /mnt/repos && \
  35. chown -R odoo /opt/odoo && \
  36. chown -R odoo /mnt/repos
  37. RUN locale-gen es_EC.UTF-8 && \
  38. dpkg-reconfigure --frontend=noninteractive locales
  39. ENV LANG es_EC.UTF-8
  40. ENV LC_ALL C.UTF-8
  41. RUN update-locale
  42. # Path to cusrtom odoo repos
  43. VOLUME ["/mnt/repos"]
  44. # Entrypoint & Cmd
  45. ENTRYPOINT ["/entrypoint.sh"]
  46. CMD ["openerp-server"]