From 0d18c3199ac69451954df5bbc9ebb79a3a188619 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20G=C3=B3mez?= Date: Thu, 9 Nov 2023 14:25:53 +0100 Subject: [PATCH] Create Dockerfile doo 14.0-17.0: update to release 20231109 --- 17.0/Dockerfile | 102 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 17.0/Dockerfile diff --git a/17.0/Dockerfile b/17.0/Dockerfile new file mode 100644 index 0000000..b3d4770 --- /dev/null +++ b/17.0/Dockerfile @@ -0,0 +1,102 @@ +FROM debian:bullseye-slim +MAINTAINER Odoo S.A. + +SHELL ["/bin/bash", "-xo", "pipefail", "-c"] + +# Generate locale C.UTF-8 for postgres and general locale data +ENV LANG C.UTF-8 + +# Retrieve the target architecture to install the correct wkhtmltopdf package +ARG TARGETARCH + +# Install some deps, lessc and less-plugin-clean-css, and wkhtmltopdf +RUN apt-get update && \ + apt-get install -y --no-install-recommends \ + ca-certificates \ + curl \ + dirmngr \ + fonts-noto-cjk \ + gnupg \ + libssl-dev \ + node-less \ + npm \ + python3-magic \ + python3-num2words \ + python3-odf \ + python3-pdfminer \ + python3-pip \ + python3-phonenumbers \ + python3-pyldap \ + python3-qrcode \ + python3-renderpm \ + python3-setuptools \ + python3-slugify \ + python3-vobject \ + python3-watchdog \ + python3-xlrd \ + python3-xlwt \ + xz-utils && \ + if [ -z "${TARGETARCH}" ]; then \ + TARGETARCH="$(dpkg --print-architecture)"; \ + fi; \ + WKHTMLTOPDF_ARCH=${TARGETARCH} && \ + case ${TARGETARCH} in \ + "amd64") WKHTMLTOPDF_ARCH=amd64 && WKHTMLTOPDF_SHA=9df8dd7b1e99782f1cfa19aca665969bbd9cc159 ;; \ + "arm64") WKHTMLTOPDF_SHA=58c84db46b11ba0e14abb77a32324b1c257f1f22 ;; \ + "ppc64le" | "ppc64el") WKHTMLTOPDF_ARCH=ppc64el && WKHTMLTOPDF_SHA=7ed8f6dcedf5345a3dd4eeb58dc89704d862f9cd ;; \ + esac \ + && curl -o wkhtmltox.deb -sSL https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-3/wkhtmltox_0.12.6.1-3.bullseye_${WKHTMLTOPDF_ARCH}.deb \ + && echo ${WKHTMLTOPDF_SHA} wkhtmltox.deb | sha1sum -c - \ + && apt-get install -y --no-install-recommends ./wkhtmltox.deb \ + && rm -rf /var/lib/apt/lists/* wkhtmltox.deb + +# install latest postgresql-client +RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ bullseye-pgdg main' > /etc/apt/sources.list.d/pgdg.list \ + && GNUPGHOME="$(mktemp -d)" \ + && export GNUPGHOME \ + && repokey='B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8' \ + && gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "${repokey}" \ + && gpg --batch --armor --export "${repokey}" > /etc/apt/trusted.gpg.d/pgdg.gpg.asc \ + && gpgconf --kill all \ + && rm -rf "$GNUPGHOME" \ + && apt-get update \ + && apt-get install --no-install-recommends -y postgresql-client \ + && rm -f /etc/apt/sources.list.d/pgdg.list \ + && rm -rf /var/lib/apt/lists/* + +# Install rtlcss (on Debian buster) +RUN npm install -g rtlcss + +# Install Odoo +ENV ODOO_VERSION 17.0 +ARG ODOO_RELEASE=20231109 +ARG ODOO_SHA=7d8cd6b8bd80d3bde7bc4a3487df55e9b7701b26 +RUN curl -o odoo.deb -sSL http://nightly.odoo.com/${ODOO_VERSION}/nightly/deb/odoo_${ODOO_VERSION}.${ODOO_RELEASE}_all.deb \ + && echo "${ODOO_SHA} odoo.deb" | sha1sum -c - \ + && apt-get update \ + && apt-get -y install --no-install-recommends ./odoo.deb \ + && rm -rf /var/lib/apt/lists/* odoo.deb + +# Copy entrypoint script and Odoo configuration file +COPY ./entrypoint.sh / +COPY ./odoo.conf /etc/odoo/ + +# Set permissions and Mount /var/lib/odoo to allow restoring filestore and /mnt/extra-addons for users addons +RUN chown odoo /etc/odoo/odoo.conf \ + && mkdir -p /mnt/extra-addons \ + && chown -R odoo /mnt/extra-addons +VOLUME ["/var/lib/odoo", "/mnt/extra-addons"] + +# Expose Odoo services +EXPOSE 8069 8071 8072 + +# Set the default config file +ENV ODOO_RC /etc/odoo/odoo.conf + +COPY wait-for-psql.py /usr/local/bin/wait-for-psql.py + +# Set default user when running the container +USER odoo + +ENTRYPOINT ["/entrypoint.sh"] +CMD ["odoo"]