Dockerfile 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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. gcc \
  9. curl \
  10. node-less \
  11. node-clean-css \
  12. python-renderpm \
  13. python-support \
  14. python-pip \
  15. python-psycopg2 \
  16. python-gevent \
  17. python-pyinotify \
  18. && curl -o wkhtmltox.deb -SL http://nightly.odoo.com/extra/wkhtmltox-0.12.1.2_linux-jessie-amd64.deb \
  19. && echo '40e8b906de658a2221b15e4e8cd82565a47d7ee8 wkhtmltox.deb' | sha1sum -c - \
  20. && dpkg --force-depends -i wkhtmltox.deb \
  21. && apt-get -y install -f --no-install-recommends \
  22. && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false -o APT::AutoRemove::SuggestsImportant=false npm \
  23. && rm -rf /var/lib/apt/lists/* wkhtmltox.deb
  24. # Install python deps
  25. RUN pip install num2words
  26. RUN pip install psycogreen
  27. RUN pip install phonenumbers
  28. # Install Odoo
  29. ENV ODOO_VERSION 8.0
  30. ENV ODOO_RELEASE 20171009
  31. RUN set -x; \
  32. curl -o odoo.deb -SL http://nightly.odoo.com/${ODOO_VERSION}/nightly/deb/odoo_${ODOO_VERSION}.${ODOO_RELEASE}_all.deb \
  33. && echo '133d49bc8ea7751752b3761e02e638d8451dfbc4 odoo.deb' | sha1sum -c - \
  34. && dpkg --force-depends -i odoo.deb \
  35. && apt-get update \
  36. && apt-get -y install -f --no-install-recommends \
  37. && rm -rf /var/lib/apt/lists/* odoo.deb
  38. # Copy entrypoint script and Odoo configuration file
  39. COPY ./entrypoint.sh /
  40. RUN chmod +x /entrypoint.sh
  41. COPY ./openerp-server.conf /etc/odoo/
  42. RUN chown odoo /etc/odoo/openerp-server.conf
  43. # Mount /var/lib/odoo to allow restoring filestore and /mnt/extra-addons for users addons
  44. RUN mkdir -p /mnt/extra-addons \
  45. && chown -R odoo /mnt/extra-addons
  46. RUN mkdir -p /opt/odoo/addons \
  47. && chown -R odoo /opt/odoo/addons
  48. VOLUME ["/var/lib/odoo", "/mnt/extra-addons"]
  49. # Expose Odoo services
  50. EXPOSE 8069 8071
  51. # Set the default config file
  52. ENV OPENERP_SERVER /etc/odoo/openerp-server.conf
  53. # Set default user when running the container
  54. USER odoo
  55. ENTRYPOINT ["/entrypoint.sh"]
  56. CMD ["openerp-server"]