gooderp18绿色标准版
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

86 líneas
4.2KB

  1. # Please note that this Dockerfile is used for testing nightly builds and should
  2. # not be used to deploy Odoo
  3. FROM debian:bookworm
  4. MAINTAINER Odoo S.A. <info@odoo.com>
  5. ENV DEBIAN_FRONTEND noninteractive
  6. ENV LC_ALL C.UTF-8
  7. RUN dpkg --add-architecture i386
  8. RUN apt-get update \
  9. && apt-get install -y curl unzip 7zip \
  10. && rm -rf /var/lib/apt/lists/*
  11. # Use wine-devel to get the fix for this bug (fixed in wine 9.3): https://bugs.winehq.org/show_bug.cgi?id=55897
  12. RUN mkdir -pm755 /etc/apt/keyrings \
  13. && curl -sSL https://dl.winehq.org/wine-builds/winehq.key -o /etc/apt/keyrings/winehq-archive.key \
  14. && curl -sSL https://dl.winehq.org/wine-builds/debian/dists/bookworm/winehq-bookworm.sources -o /etc/apt/sources.list.d/winehq.sources \
  15. && apt-get update \
  16. && apt-get install --install-recommends -y winehq-devel \
  17. && rm -rf /var/lib/apt/lists/*
  18. USER odoo
  19. ARG DRIVE_C_DIR=/var/lib/odoo/.wine/drive_c
  20. ARG ODOO_BUILD_DIR=${DRIVE_C_DIR}/odoobuild
  21. # pre-create directories and link odoo sources to their mount point
  22. RUN mkdir -pm755 ${DRIVE_C_DIR} ${ODOO_BUILD_DIR}/nssm-2.24 ${ODOO_BUILD_DIR}/vcredist ${ODOO_BUILD_DIR}/WinPy64 ${ODOO_BUILD_DIR}/wkhtmltopdf \
  23. && ln -s /data/src ${ODOO_BUILD_DIR}/server
  24. # Ignoring debug and fixme's message when running wine
  25. ENV WINEDEBUG=-all
  26. ARG NSIS_URL=https://downloads.sourceforge.net/project/nsis/NSIS%203/3.10/nsis-3.10.zip
  27. RUN curl -sSL ${NSIS_URL} -o /tmp/nsis.zip \
  28. && unzip /tmp/nsis.zip -d ${DRIVE_C_DIR} \
  29. && rm /tmp/nsis.zip
  30. ARG NSIS_PLUG_CURL=https://github.com/negrutiu/nsis-nscurl/releases/download/v24.6.7.61/NScurl.zip
  31. RUN curl -sSL ${NSIS_PLUG_CURL} -o /tmp/nsis_curl.zip \
  32. && unzip /tmp/nsis_curl.zip Plugins/* -d ${DRIVE_C_DIR}/nsis-3.10/ \
  33. && rm /tmp/nsis_curl.zip
  34. ARG NSIS_PLUG_ACCESS=https://nsis.sourceforge.io/mediawiki/images/4/4a/AccessControl.zip
  35. RUN curl -sSL ${NSIS_PLUG_ACCESS} -o /tmp/nsis_access.zip \
  36. && unzip /tmp/nsis_access.zip Plugins/* -d ${DRIVE_C_DIR}/nsis-3.10/ \
  37. && mv ${DRIVE_C_DIR}/nsis-3.10/Plugins/i386-unicode/* ${DRIVE_C_DIR}/nsis-3.10/Plugins/x86-unicode/ \
  38. && mv ${DRIVE_C_DIR}/nsis-3.10/Plugins/i386-ansi/* ${DRIVE_C_DIR}/nsis-3.10/Plugins/x86-ansi/ \
  39. && rm /tmp/nsis_access.zip
  40. ARG NSIS_PLUG_UNZIP=https://nsis.sourceforge.io/mediawiki/images/5/5a/NSISunzU.zip
  41. RUN curl -sSL ${NSIS_PLUG_UNZIP} -o /tmp/nsis_unzip.zip \
  42. && unzip -j /tmp/nsis_unzip.zip NSISunzU/Plugin*/* -d ${DRIVE_C_DIR}/nsis-3.10/Plugins/x86-unicode/ \
  43. && rm /tmp/nsis_unzip.zip
  44. ARG WINPY=7.5.20240410final/Winpython64-3.12.3.0dot.exe
  45. RUN curl -sSL https://github.com/winpython/winpython/releases/download/${WINPY} -o /tmp/winpydot.exe \
  46. && 7zz x /tmp/winpydot.exe -o${ODOO_BUILD_DIR} \
  47. && mv ${ODOO_BUILD_DIR}/WPy64*/* ${ODOO_BUILD_DIR}/WinPy64/ \
  48. && rmdir ${ODOO_BUILD_DIR}/WPy64* \
  49. && rm /tmp/winpydot.exe
  50. RUN curl -sSL https://nssm.cc/release/nssm-2.24.zip -o /tmp/nssm.zip \
  51. && unzip /tmp/nssm.zip -d ${ODOO_BUILD_DIR} \
  52. && rm /tmp/nssm.zip
  53. ARG WKHTMLTOPDF_URL=https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox-0.12.6-1.msvc2015-win64.exe
  54. RUN curl ${WKHTMLTOPDF_URL} -sSL -o/tmp/wkhtml_installer.exe \
  55. && echo '1efcfaf8472871268fd399865a3e62b435b91d4413009b80830eaaff7a57d088 /tmp/wkhtml_installer.exe' | sha256sum -c \
  56. && 7zz e /tmp/wkhtml_installer.exe bin/wkhtmltopdf.exe -o${ODOO_BUILD_DIR}/wkhtmltopdf/ \
  57. && rm /tmp/wkhtml_installer.exe
  58. ADD --chown=odoo:odoo \
  59. https://download.microsoft.com/download/9/3/F/93FCF1E7-E6A4-478B-96E7-D4B285925B00/vc_redist.x64.exe \
  60. ${ODOO_BUILD_DIR}/vcredist/
  61. # Pre install requirements
  62. ADD --chown=odoo:odoo requirements.txt ${DRIVE_C_DIR}
  63. ADD --chown=odoo:odoo requirements-local-proxy.txt ${DRIVE_C_DIR}
  64. ADD --chown=odoo:odoo https://nightly.odoo.com/wheels/netifaces-0.11.0-cp312-cp312-win_amd64.whl ${DRIVE_C_DIR}
  65. RUN wine ${ODOO_BUILD_DIR}/WinPy64/python-3.12.3.amd64/python.exe -m pip install --upgrade pip \
  66. && wine ${ODOO_BUILD_DIR}/WinPy64/python-3.12.3.amd64/python.exe -m pip install "c:\netifaces-0.11.0-cp312-cp312-win_amd64.whl" \
  67. && cat ${DRIVE_C_DIR}/requirements*.txt | while read PACKAGE ; do \
  68. echo "${PACKAGE%%#*}" ; wine ${ODOO_BUILD_DIR}/WinPy64/python-3.12.3.amd64/python.exe -m pip install "${PACKAGE%%#*}" ; \
  69. done
上海开阖软件有限公司 沪ICP备12045867号-1