Dockerfile 2.2 KB

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