You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

76 lines
3.9 KiB

  1. FROM ubuntu:14.04
  2. # Starting from ubuntu 14 as its the only one really supported for wkhtmltopdf (I don't like hacking around).
  3. # Also its a docker image, not a server.
  4. ENV DEBIAN_FRONTEND=noninteractive
  5. # Install the basics
  6. RUN ln -fs /usr/share/zoneinfo/Europe/Brussels /etc/localtime && \
  7. apt-get update && apt-get install -y curl git postgresql python-psycopg2 python-pip && \
  8. dpkg-reconfigure --frontend noninteractive tzdata
  9. # Install wkhtmltopdf 0.12.1
  10. RUN curl -L https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.1/wkhtmltox-0.12.1_linux-trusty-amd64.deb \
  11. --output wkhtmltox-0.12.1_linux-trusty-amd64.deb && \
  12. (dpkg -i wkhtmltox-0.12.1_linux-trusty-amd64.deb || apt-get -f install -y) && \
  13. ln -s /usr/local/bin/wkhtmltoimage /usr/bin/wkhtmltoimage && \
  14. ln -s /usr/local/bin/wkhtmltopdf /usr/bin/wkhtmltopdf && \
  15. rm -f wkhtmltox-0.12.1_linux-trusty-amd64.deb
  16. # Node (ubuntu 14 version of node is Old as f*)
  17. RUN curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash - && \
  18. apt-get install -y nodejs && \
  19. npm install -g less less-plugin-clean-css
  20. RUN useradd -ms /bin/bash odoo
  21. USER odoo
  22. RUN mkdir -p /home/odoo/extra-addons
  23. WORKDIR /home/odoo
  24. RUN git clone https://github.com/coopiteasy/OCB.git /home/odoo/odoo -b 9.0 --depth 1 && \
  25. git clone https://github.com/coopiteasy/addons.git /home/odoo/addons -b 9.0 --depth 1 && \
  26. git clone https://github.com/beescoop/Obeesdoo.git /home/odoo/obeesdoo -b 9.0 --depth 1 && \
  27. git clone https://github.com/coopiteasy/procurement-addons.git /home/odoo/procurement-addons -b 9.0 --depth 1 && \
  28. git clone https://github.com/coopiteasy/vertical-cooperative.git /home/odoo/vertical-cooperative -b 9.0 --depth 1 && \
  29. git clone https://github.com/coopiteasy/account-financial-reporting.git /home/odoo/account-financial-reporting -b 9.0 --depth 1 && \
  30. git clone https://github.com/coopiteasy/account-financial-tools.git /home/odoo/account-financial-tools -b 9.0 --depth 1 && \
  31. git clone https://github.com/coopiteasy/bank-payment.git /home/odoo/bank-payment -b 9.0 --depth 1 && \
  32. git clone https://github.com/coopiteasy/l10n-belgium.git /home/odoo/l10n-belgium -b 9.0 --depth 1 && \
  33. git clone https://github.com/coopiteasy/mis-builder.git /home/odoo/mis-builder -b 9.0 --depth 1 && \
  34. git clone https://github.com/coopiteasy/pos.git /home/odoo/pos -b 9.0 --depth 1 && \
  35. git clone https://github.com/coopiteasy/reporting-engine.git /home/odoo/reporting-engine -b 9.0 --depth 1 && \
  36. git clone https://github.com/coopiteasy/server-tools.git /home/odoo/server-tools -b 9.0 --depth 1 && \
  37. git clone https://github.com/coopiteasy/web.git /home/odoo/web -b 9.0 --depth 1 && \
  38. git clone https://github.com/coopiteasy/website.git /home/odoo/website -b 9.0 --depth 1 && \
  39. echo "That's all folks!"
  40. USER root
  41. RUN pip install --upgrade pip
  42. # adding dependencies here so that we don't have to rebuild the previous steps if it changes.
  43. # python c header files
  44. # pillow dependencies
  45. # more pillow dependencies
  46. # python-lxml
  47. # python-ldap
  48. RUN apt-get install -y python-dev \
  49. libtiff5-dev libjpeg8-dev zlib1g-dev libfreetype6-dev liblcms2-dev \
  50. libwebp-dev tcl8.6-dev tk8.6-dev \
  51. libxml2-dev libxslt1-dev \
  52. libsasl2-dev libldap2-dev libssl-dev
  53. USER odoo
  54. # Installing in user space because system-libraries cannot be uninstalled and conflict.
  55. # Simpler than creating a virtualenv
  56. RUN sed -i '/psycopg2/d' /home/odoo/odoo/requirements.txt && \
  57. sed -i '/xlwt/d' /home/odoo/odoo/requirements.txt && \
  58. sed -i '/python-ldap/d' /home/odoo/odoo/requirements.txt && \
  59. pip install --user -r /home/odoo/odoo/requirements.txt \
  60. -r /home/odoo/reporting-engine/requirements.txt \
  61. -r /home/odoo/server-tools/requirements.txt \
  62. -r /home/odoo/obeesdoo/requirements.txt \
  63. -r /home/odoo/pos/requirements.txt
  64. WORKDIR /home/odoo/odoo
  65. CMD python odoo.py