Dockerfile 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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. # Install Odoo
  32. ENV ODOO_VERSION 8.0
  33. ENV ODOO_RELEASE 20160329
  34. RUN set -x; \
  35. curl -o odoo.deb -SL http://nightly.odoo.com/${ODOO_VERSION}/nightly/deb/odoo_${ODOO_VERSION}.${ODOO_RELEASE}_all.deb \
  36. && echo 'b363901424d0181b385971c6f3dfe093b85c0d36 odoo.deb' | sha1sum -c - \
  37. && dpkg --force-depends -i odoo.deb \
  38. && apt-get update \
  39. && apt-get -y install -f --no-install-recommends \
  40. && rm -rf /var/lib/apt/lists/* odoo.deb
  41. # Copy entrypoint script and Odoo configuration file
  42. COPY ./entrypoint.sh /
  43. RUN chmod +x /entrypoint.sh
  44. COPY ./openerp-server.conf /etc/odoo/
  45. RUN chown odoo /etc/odoo/openerp-server.conf
  46. # Mount /var/lib/odoo to allow restoring filestore and /mnt/extra-addons for users addons
  47. RUN mkdir -p /mnt/extra-addons \
  48. && chown -R odoo /mnt/extra-addons
  49. RUN mkdir -p /opt/odoo/addons \
  50. && chown -R odoo /opt/odoo/addons
  51. VOLUME ["/var/lib/odoo", "/mnt/extra-addons", "/opt/odoo/addons"]
  52. # Expose Odoo services
  53. EXPOSE 8069 8071
  54. # Set the default config file
  55. ENV OPENERP_SERVER /etc/odoo/openerp-server.conf
  56. # Set default user when running the container
  57. USER odoo
  58. ENTRYPOINT ["/entrypoint.sh"]
  59. CMD ["openerp-server"]