[ADD]Odoo 14 base
This commit is contained in:
parent
da07792132
commit
1c47208abe
@ -65,6 +65,13 @@ services:
|
||||
dockerfile: Dockerfile.ext.12
|
||||
image: registry.yaltik.net/odoo:yaltik12
|
||||
|
||||
odoobase14:
|
||||
init: true
|
||||
build:
|
||||
context: ./odoo
|
||||
dockerfile: Dockerfile.14
|
||||
image: registry.yaltik.net/odoo:yaltikbase14
|
||||
|
||||
flectra:
|
||||
init: true
|
||||
build:
|
||||
|
91
odoo/odoo/Dockerfile.14
Normal file
91
odoo/odoo/Dockerfile.14
Normal file
@ -0,0 +1,91 @@
|
||||
FROM debian:buster-slim
|
||||
MAINTAINER Yaltik - Fabien Bourgeois <fabien@yaltik.com>
|
||||
|
||||
# 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
|
||||
|
||||
# Odoo dependencies from Debian APT repository
|
||||
|
||||
# RUN apt update \
|
||||
# && apt-get install -y --no-install-recommends \
|
||||
# python3-pip python3-pyldap python3-qrcode python3-renderpm \
|
||||
# python3-setuptools python3-vobject python3-watchdog python3-dev \
|
||||
# build-essential git mercurial curl \
|
||||
# libxml2-dev libxslt1-dev libldap2-dev libsasl2-dev libjpeg-dev libpq-dev \
|
||||
# libfreetype6-dev libssl1.0-dev \
|
||||
# nodejs node-less xz-utils
|
||||
|
||||
# Handle Node PATH
|
||||
# RUN ln -s /usr/bin/nodejs /usr/bin/node
|
||||
|
||||
|
||||
# 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-num2words 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
|
||||
|
||||
# WKHTMLTOPDF
|
||||
RUN curl -o wkhtmltox.deb -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.buster_amd64.deb \
|
||||
&& echo 'ea8277df4297afc507c61122f3c349af142f31e5 wkhtmltox.deb' | sha1sum -c - \
|
||||
&& apt-get install -y --no-install-recommends ./wkhtmltox.deb \
|
||||
&& rm -rf /var/lib/apt/lists/* wkhtmltox.deb
|
||||
|
||||
# PostgreSQL-client
|
||||
RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ buster-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 libpq-dev postgresql-client-12
|
||||
|
||||
# NPM rtlcss
|
||||
RUN npm install -g rtlcss
|
||||
|
||||
# Needed to build
|
||||
RUN apt-get install -y --no-install-recommends build-essential git mercurial curl \
|
||||
python3-dev libxml2-dev libxslt1-dev libldap2-dev libsasl2-dev \
|
||||
libjpeg-dev libfreetype6-dev libssl-dev
|
||||
|
||||
# Packages cleanup
|
||||
RUN apt-get purge -y --auto-remove && apt-get clean
|
||||
|
||||
# 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
|
||||
RUN git clone -b ${ODOO_BRANCH} --depth 1 https://github.com/OCA/OCB.git
|
||||
# PATH update
|
||||
RUN echo 'export PATH="$PATH:$HOME/.local/bin/"' >> /opt/odoo/.profile
|
||||
RUN pip3 install --user -U pip
|
||||
RUN .local/bin/pip3 install --user -r OCB/requirements.txt
|
||||
RUN .local/bin/pip3 install --user phonenumbers
|
||||
|
||||
# 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" ]
|
7
odoo/odoo/launch14.sh
Normal file
7
odoo/odoo/launch14.sh
Normal file
@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
CONF=/opt/odoo/odoo.conf
|
||||
ODOOCMD="python3 /opt/odoo/OCB/odoo-bin --config $CONF"
|
||||
|
||||
# Configuration generation and Odoo launch
|
||||
bash genconf.sh && $ODOOCMD
|
Loading…
Reference in New Issue
Block a user