- Makefile show version, switch version and install different version - erplibre_version with odoo_version, poetry_version and python_version - support multiple docker version - support odoo 12, odoo 14, odoo 16 - bullseye, bookworm debian - update latest version - script update_env_version to detect actual version and refactor it - adapt file path to support multiple version - poetry with verbose by default, ignore python keyring - python script to generate image db with parallel for all odoo version - check_addons_exist before generate all image - support delay to change queue parallel - fix odoo 12 product configurator - can show demo website - swith odoo - force create addons if missing - update manifest, because gen config break with wrong manifest
95 lines
3.1 KiB
Docker
95 lines
3.1 KiB
Docker
FROM debian:buster-slim
|
|
MAINTAINER Odoo S.A. <info@odoo.com>
|
|
|
|
SHELL ["/bin/bash", "-xo", "pipefail", "-c"]
|
|
|
|
# Generate locale C.UTF-8 for postgres and general locale data
|
|
ENV LANG C.UTF-8
|
|
|
|
# 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-pip \
|
|
python3-phonenumbers \
|
|
python3-pyldap \
|
|
python3-qrcode \
|
|
python3-renderpm \
|
|
python3-setuptools \
|
|
python3-slugify \
|
|
python3-vobject \
|
|
python3-watchdog \
|
|
python3-xlrd \
|
|
python3-xlwt \
|
|
cython \
|
|
xz-utils \
|
|
git \
|
|
iproute2 \
|
|
inetutils-ping \
|
|
&& curl -o wkhtmltox.deb -sSL https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.buster_amd64.deb \
|
|
&& echo 'd9f259a67e05e1c221d48b504453645e6c491fab wkhtmltox.deb' | sha1sum -c - \
|
|
&& apt-get install -y --no-install-recommends ./wkhtmltox.deb \
|
|
&& rm -rf /var/lib/apt/lists/* wkhtmltox.deb
|
|
|
|
RUN npm i prettier
|
|
|
|
# install latest 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 postgresql-client \
|
|
&& rm -f /etc/apt/sources.list.d/pgdg.list \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
|
|
# Install Odoo
|
|
ENV ODOO_VERSION 12.0
|
|
ARG ODOO_RELEASE=20200417
|
|
ARG ODOO_SHA=ca4a7485b0b75850ffe1458a8f3266839400a501
|
|
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 /
|
|
RUN chmod +x /entrypoint.sh
|
|
COPY ./odoo.conf /etc/odoo/
|
|
|
|
# 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
|
|
|
|
RUN chmod +X /usr/local/bin/wait-for-psql.py
|
|
|
|
# Set default user when running the container
|
|
USER odoo
|
|
|
|
ENTRYPOINT ["/entrypoint.sh"]
|
|
CMD ["odoo"]
|