[REV]Revert Moka12 : will be handled on its space

This commit is contained in:
Fabien BOURGEOIS 2021-03-25 12:01:28 +01:00
parent 6c710e3467
commit 9b5112f73e
2 changed files with 0 additions and 189 deletions

View File

@ -65,13 +65,6 @@ services:
dockerfile: Dockerfile.ext.12 dockerfile: Dockerfile.ext.12
image: registry.yaltik.net/odoo:yaltik12 image: registry.yaltik.net/odoo:yaltik12
moka12:
init: true
build:
context: ./odoo
dockerfile: Dockerfile.moka12
image: registry.yaltik.net/odoo:moka12
odoobase14: odoobase14:
init: true init: true
build: build:

View File

@ -1,182 +0,0 @@
FROM python:3.6.9-slim-buster AS base
EXPOSE 8069 8072
# Enable Odoo user and filestore
RUN useradd -md /home/odoo -s /bin/false odoo \
&& mkdir -p /var/lib/odoo \
&& chown -R odoo:odoo /var/lib/odoo \
&& sync
# System environment variables
ENV GIT_AUTHOR_NAME=docker-odoo \
GIT_COMMITTER_NAME=docker-odoo \
EMAIL=docker-odoo@example.com \
LC_ALL=C.UTF-8 \
NODE_PATH=/usr/local/lib/node_modules:/usr/lib/node_modules \
PATH="/home/odoo/.local/bin:$PATH" \
PIP_NO_CACHE_DIR=0 \
PYTHONOPTIMIZE=1
# Other requirements and recommendations to run Odoo
# See https://github.com/$ODOO_SOURCE/blob/$ODOO_VERSION/debian/control
ARG WKHTMLTOPDF_VERSION=0.12.5
ARG WKHTMLTOPDF_CHECKSUM='1140b0ab02aa6e17346af2f14ed0de807376de475ba90e1db3975f112fbd20bb'
RUN apt-get -qq update \
&& apt-get -yqq upgrade \
&& apt-get install -yqq --no-install-recommends curl \
&& apt-get install -yqq --no-install-recommends \
chromium \
ffmpeg \
fonts-liberation2 \
gettext-base \
git \
gnupg2 \
locales-all \
nano \
npm \
wget \
openssh-client \
ruby \
telnet \
vim \
zlibc \
sudo \
&& echo 'deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main' >> /etc/apt/sources.list.d/postgresql.list \
&& curl -SL https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - \
&& curl -sL https://deb.nodesource.com/setup_8.x | bash - \
&& apt-get update \
&& apt-get install -yqq --no-install-recommends nodejs postgresql-client \
&& curl -SLo wkhtmltox.deb https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/${WKHTMLTOPDF_VERSION}/wkhtmltox_${WKHTMLTOPDF_VERSION}-1.stretch_amd64.deb \
&& echo "${WKHTMLTOPDF_CHECKSUM} wkhtmltox.deb" | sha256sum -c - \
&& apt-get install -yqq --no-install-recommends ./wkhtmltox.deb \
&& rm wkhtmltox.deb \
&& wkhtmltopdf --version \
&& rm -Rf /var/lib/apt/lists/* /tmp/*
# Special case to get latest Less
RUN ln -s /usr/bin/nodejs /usr/local/bin/node \
&& npm install -g less \
&& rm -Rf ~/.npm /tmp/*
# Execute installation script by Odoo version
# This is at the end to benefit from cache at build time
# https://docs.docker.com/engine/reference/builder/#/impact-on-build-caching
ARG ODOO_VERSION=12.0
ARG ODOO_SOURCE=odoo/odoo
RUN build_deps=" \
build-essential \
libfreetype6-dev \
libfribidi-dev \
libghc-zlib-dev \
libharfbuzz-dev \
libjpeg-dev \
liblcms2-dev \
libldap2-dev \
libopenjp2-7-dev \
libpq-dev \
libsasl2-dev \
libtiff5-dev \
libwebp-dev \
libxml2-dev \
libxslt-dev \
tcl-dev \
tk-dev \
zlib1g-dev \
" \
&& apt-get update \
&& apt-get install -yqq --no-install-recommends $build_deps \
&& pip install --no-cache-dir -r https://raw.githubusercontent.com/$ODOO_SOURCE/$ODOO_VERSION/requirements.txt \
&& pip install --no-cache-dir \
git+git://github.com/OCA/openupgradelib.git \
git-aggregator \
click-odoo-contrib \
phonenumbers \
ipython \
pysnooper \
ipdb \
pg_activity \
'websocket-client~=0.53' \
&& (python3 -m compileall -q /usr/local/lib/python3.6/ || true) \
&& apt-get purge -yqq $build_deps \
&& rm -Rf /var/lib/apt/lists/* /tmp/*
# Create directory structure
ENV SOURCES=/home/odoo/src \
CUSTOM=/home/odoo/custom \
RESOURCES=/home/odoo/.resources \
CONFIG_DIR=/home/odoo/.config \
DATA_DIR=/home/odoo/data
RUN mkdir -p $SOURCES/repositories && \
mkdir -p $CUSTOM/repositories && \
mkdir -p $DATA_DIR && \
mkdir -p $CONFIG_DIR && \
mkdir -p $RESOURCES && \
chown -R odoo.odoo /home/odoo && \
sync
# Config env
ENV OPENERP_SERVER=$CONFIG_DIR/odoo.conf
ENV ODOO_RC=$OPENERP_SERVER
# Image building scripts
COPY bin/* /usr/local/bin/
COPY conf.d $RESOURCES/conf.d
COPY entrypoint.d $RESOURCES/entrypoint.d
COPY entrypoint.sh $RESOURCES/entrypoint.sh
RUN ln /usr/local/bin/direxec $RESOURCES/entrypoint \
&& chown -R odoo.odoo $RESOURCES \
&& chmod -R a+rx $RESOURCES/entrypoint* /usr/local/bin \
&& sync
# Metadata
ARG VCS_REF
ARG BUILD_DATE
ARG VERSION
LABEL org.label-schema.schema-version="$VERSION" \
org.label-schema.vendor=Moka \
org.label-schema.license=Apache-2.0 \
org.label-schema.build-date="$BUILD_DATE" \
org.label-schema.vcs-ref="$VCS_REF" \
org.label-schema.vcs-url="https://github.com/Moka-Tourisme/docker-moka"
VOLUME ["/home/odoo/data"]
WORKDIR "/home/odoo"
ENTRYPOINT ["/home/odoo/.resources/entrypoint.sh"]
CMD ["odoo"]
# ODOO CONF DEFAULT VALUES
ARG UNACCENT=true
ARG PROXY_MODE=true
ARG WITHOUT_DEMO=true
ARG WAIT_PG=true
ARG PGUSER=odoo
ARG PGPASSWORD=odoo
ARG PGHOST=db
ARG PGPORT=5432
ARG ADMIN_PASSWORD=admin
# Set env from args
ENV UNACCENT="$UNACCENT" \
PROXY_MODE="$PROXY_MODE" \
WITHOUT_DEMO="$WITHOUT_DEMO" \
WAIT_PG="$WAIT_PG" \
PGUSER="$PGUSER" \
PGPASSWORD="$PGPASSWORD" \
PGHOST="$PGHOST" \
PGPORT="$PGPORT" \
ADMIN_PASSWORD="$ADMIN_PASSWORD" \
ODOO_VERSION="$ODOO_VERSION"
USER odoo
# HACK Special case for Werkzeug
RUN pip install --user Werkzeug==0.14.1
# Odoo
FROM base AS odoo
ARG ODOO_VERSION=12.0
ARG ODOO_SOURCE=OCA/OCB
ARG ODOO_SOURCE_DEPTH=1
RUN git clone --single-branch --depth $ODOO_SOURCE_DEPTH --branch $ODOO_VERSION https://github.com/$ODOO_SOURCE $SOURCES/odoo
RUN pip install --user --no-cache-dir --editable $SOURCES/odoo