From f6b9b93c0ba11e4818a820f1dc6fce22c85b5635 Mon Sep 17 00:00:00 2001 From: Fabien BOURGEOIS Date: Fri, 17 May 2024 17:44:26 +0200 Subject: [PATCH] [ADD]Odoo images v14 from Oraclelinux 8 --- odoo/base.yml | 14 +++++++++ odoo/dev.yml | 6 ++++ odoo/odoo/Dockerfile.14.ol8 | 53 +++++++++++++++++++++++++++++++++ odoo/odoo/Dockerfile.14.ol8.dev | 17 +++++++++++ odoo/odoo/Dockerfile.ext.14.ol8 | 27 +++++++++++++++++ 5 files changed, 117 insertions(+) create mode 100644 odoo/odoo/Dockerfile.14.ol8 create mode 100644 odoo/odoo/Dockerfile.14.ol8.dev create mode 100644 odoo/odoo/Dockerfile.ext.14.ol8 diff --git a/odoo/base.yml b/odoo/base.yml index 8bc932a..e3d6a51 100644 --- a/odoo/base.yml +++ b/odoo/base.yml @@ -93,6 +93,13 @@ services: dockerfile: Dockerfile.14 image: registry.yaltik.net/odoo:yaltikbase14 + odoobase14ol8: + init: true + build: + context: ./odoo + dockerfile: Dockerfile.14.ol8 + image: registry.yaltik.net/odoo:yaltikbase14ol8 + odoo14: init: true build: @@ -100,6 +107,13 @@ services: dockerfile: Dockerfile.ext.14 image: registry.yaltik.net/odoo:yaltik14 + odoo14ol8: + init: true + build: + context: ./odoo + dockerfile: Dockerfile.ext.14.ol8 + image: registry.yaltik.net/odoo:yaltik14ol8 + odoobase15: init: true build: diff --git a/odoo/dev.yml b/odoo/dev.yml index b38f4bc..dce6963 100644 --- a/odoo/dev.yml +++ b/odoo/dev.yml @@ -49,6 +49,12 @@ services: dockerfile: Dockerfile.14.dev image: registry.yaltik.net/odoodev:yaltik14 + odoodev14ol8: + build: + context: ./odoo + dockerfile: Dockerfile.14.ol8.dev + image: registry.yaltik.net/odoodev:yaltik14ol8 + odoodev15: build: context: ./odoo diff --git a/odoo/odoo/Dockerfile.14.ol8 b/odoo/odoo/Dockerfile.14.ol8 new file mode 100644 index 0000000..b6262af --- /dev/null +++ b/odoo/odoo/Dockerfile.14.ol8 @@ -0,0 +1,53 @@ +FROM oraclelinux:8 +LABEL maintainer="Yaltik - Fabien Bourgeois " + +# Generate locale C.UTF-8 for postgres and general locale data +# http://bugs.python.org/issue19846 +# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK. +ENV LANG C.UTF-8 + +SHELL ["/bin/bash", "-o", "pipefail", "-c"] + +# Odoo dependencies from OL repositories, python38 and WKHTML +# Then PG10 and fonts +RUN yum -y groupinstall "Development Tools" && \ + yum -y install zlib-devel bzip2-devel openssl openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel libpcap xz-devel git mercurial libpng libjpeg libXext curl xorg-x11-font-utils fontconfig libevent-devel libxml2-devel libxslt-devel openldap-devel openjpeg2 freetype-devel libjpeg-turbo-devel libtiff-devel kernel-devel mailcap nodejs npm python38-devel python38-pip postgresql libpq libpq-devel liberation-fonts && \ + yum -y install https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox-0.12.5-1.centos8.x86_64.rpm && \ + yum clean all && \ + /usr/sbin/update-alternatives --set python3 /usr/bin/python3.8 + +# Install NPM dependencies +RUN npm install -g less@3 less-plugin-clean-css@1.5.1 rtlcss@2.6.2 + +# Create odoo user +RUN useradd odoo -md /opt/odoo + +# Install OCB 14.0 latest +ENV ODOO_BRANCH 14.0 +WORKDIR /opt/odoo +# Default user : odoo +USER odoo + +RUN mkdir pipcache data backups extra-addons custom-addons && \ + git clone -b ${ODOO_BRANCH} --depth 1 https://github.com/OCA/OCB.git && \ + pip3.8 install --user --no-cache-dir -r OCB/requirements.txt && \ + pip3.8 install --no-cache-dir --user -U pip==22.0.3 && \ + pip3.8 install --no-cache-dir --user virtualenv==20.26.2 \ + phonenumbers==8.12.44 \ rl-renderPM==4.0.3 \ + pdfminer==20191125 python-slugify==6.1.2 watchdog==2.3.1 + +# Launch scripts +COPY ./launch14.sh ./launch.sh +COPY ./genconf.sh ./ + +# Post-install tasks +RUN touch odoo.conf +ENV ODOO_RC /opt/odoo/odoo.conf + +# Odoo default ports +EXPOSE 8069 8071 8072 + +# Volumes : data dir for filestore and addons +VOLUME /opt/odoo/data + +CMD [ "bash", "launch.sh" ] diff --git a/odoo/odoo/Dockerfile.14.ol8.dev b/odoo/odoo/Dockerfile.14.ol8.dev new file mode 100644 index 0000000..59e191d --- /dev/null +++ b/odoo/odoo/Dockerfile.14.ol8.dev @@ -0,0 +1,17 @@ +FROM registry.yaltik.net/odoo:yaltik14ol8 +LABEL maintainer="Yaltik - Fabien Bourgeois " + +# PostgreSQL CLI +# RUN pip3 install --user pgcli +# COPY pgcli.sh ./ +# Odoo specific +# Gevent : last py 3.6, fix local dev problem with CPU 100% on Fedora (kernel problem ?) +RUN pip3.8 install --no-cache-dir --user ipython==7.16.3 && \ + mkdir -p /opt/odoo/.ipython/profile_default + +COPY ipython_config.py /opt/odoo/.ipython/profile_default/ +COPY shell_helpers.py /opt/odoo/ +COPY shell12.sh /opt/odoo/shell.sh +COPY i18n.sh /opt/odoo/i18n.sh +COPY launch12.dev.sh /opt/odoo/launch.sh +ENV DEV 1 diff --git a/odoo/odoo/Dockerfile.ext.14.ol8 b/odoo/odoo/Dockerfile.ext.14.ol8 new file mode 100644 index 0000000..cb1cd78 --- /dev/null +++ b/odoo/odoo/Dockerfile.ext.14.ol8 @@ -0,0 +1,27 @@ +FROM registry.yaltik.net/odoo:yaltikbase14ol8 +LABEL maintainer="Yaltik - Fabien Bourgeois " + +# External code +WORKDIR /opt/odoo/extra-addons +RUN git clone --depth 1 -b 14.0 https://github.com/OCA/community-data-files && \ + git clone --depth 1 -b 14.0 https://github.com/OCA/l10n-france && \ + git clone --depth 1 -b 14.0 https://github.com/OCA/queue && \ + git clone --depth 1 -b 14.0 https://github.com/OCA/partner-contact && \ + git clone --depth 1 -b 14.0 https://github.com/OCA/social && \ + git clone --depth 1 -b 14.0 https://github.com/OCA/server-brand && \ + git clone --depth 1 -b 14.0 https://github.com/OCA/web && \ + git clone --depth 1 -b 14.0 https://github.com/OCA/website && \ + git clone --depth 1 -b 14.0 https://github.com/Openworx/backend_theme + +# Custom code +WORKDIR /opt/odoo/custom-addons +RUN git clone --depth 1 -b 14.0 https://git.yaltik.net/Yaltik/yaltik_odoo_custom.git + +WORKDIR /opt/odoo + +# Addons dependencies +RUN pip3.8 install --user --no-cache-dir setuptools-scm==6.4.2 && \ + pip3.8 install --user --no-cache-dir git+https://github.com/OCA/openupgradelib.git@3.3.2 + +# Scripts +COPY i18n-import.sh upd.sh /opt/odoo/