Dockerfile 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. FROM debian:jessie
  2. MAINTAINER Robert Alexis Gauto <robert.gauto@gmail.com>
  3. # Install some deps, lessc and less-plugin-clean-css, and wkhtmltopdf
  4. RUN set -x; \
  5. apt-get update \
  6. && apt-get install -y --no-install-recommends \
  7. ca-certificates \
  8. curl \
  9. node-less \
  10. node-clean-css \
  11. python-pyinotify \
  12. python-renderpm \
  13. python-support \
  14. python-pip \
  15. python-psycopg2 \
  16. python-gevent \
  17. gcc \
  18. python-dev \
  19. libffi-dev \
  20. libssh-dev \
  21. && curl -o wkhtmltox.deb -SL http://nightly.odoo.com/extra/wkhtmltox-0.12.1.2_linux-jessie-amd64.deb \
  22. && echo '40e8b906de658a2221b15e4e8cd82565a47d7ee8 wkhtmltox.deb' | sha1sum -c - \
  23. && dpkg --force-depends -i wkhtmltox.deb \
  24. && apt-get -y install -f --no-install-recommends \
  25. && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false -o APT::AutoRemove::SuggestsImportant=false npm \
  26. && rm -rf /var/lib/apt/lists/* wkhtmltox.deb
  27. # Install python deps
  28. RUN pip install num2words
  29. RUN pip install psycogreen
  30. RUN pip install pysftp
  31. # Remove unused packages
  32. RUN set -x; \
  33. apt-get remove \
  34. gcc \
  35. python-dev \
  36. libffi-dev \
  37. && apt-get auto-remove
  38. # Install Odoo
  39. ENV ODOO_VERSION 8.0
  40. ENV ODOO_RELEASE 20160329
  41. RUN set -x; \
  42. curl -o odoo.deb -SL http://nightly.odoo.com/${ODOO_VERSION}/nightly/deb/odoo_${ODOO_VERSION}.${ODOO_RELEASE}_all.deb \
  43. && echo 'b363901424d0181b385971c6f3dfe093b85c0d36 odoo.deb' | sha1sum -c - \
  44. && dpkg --force-depends -i odoo.deb \
  45. && apt-get update \
  46. && apt-get -y install -f --no-install-recommends \
  47. && rm -rf /var/lib/apt/lists/* odoo.deb
  48. # Copy entrypoint script and Odoo configuration file
  49. COPY ./entrypoint.sh /
  50. RUN chmod +x /entrypoint.sh
  51. COPY ./openerp-server.conf /etc/odoo/
  52. RUN chown odoo /etc/odoo/openerp-server.conf
  53. # Mount /var/lib/odoo to allow restoring filestore and /mnt/extra-addons for users addons
  54. RUN mkdir -p /mnt/extra-addons \
  55. && chown -R odoo /mnt/extra-addons
  56. RUN mkdir -p /opt/odoo/addons \
  57. && chown -R odoo /opt/odoo/addons
  58. VOLUME ["/var/lib/odoo", "/mnt/extra-addons", "/opt/odoo/addons"]
  59. # Expose Odoo services
  60. EXPOSE 8069 8071
  61. # Set the default config file
  62. ENV OPENERP_SERVER /etc/odoo/openerp-server.conf
  63. # Set default user when running the container
  64. USER odoo
  65. ENTRYPOINT ["/entrypoint.sh"]
  66. CMD ["openerp-server"]