[ADD]Base image for Odoo v11

This commit is contained in:
Fabien BOURGEOIS 2017-10-22 07:36:22 +02:00
parent 315225c663
commit 28152c6ad7
3 changed files with 81 additions and 0 deletions

View File

@ -66,6 +66,24 @@ services:
POSTGRES_USER: odoo
POSTGRES_PASSWORD: somethingToChange
odoo11:
init: true
build:
context: ./odoo
dockerfile: Dockerfile.11
image: registry.yaltik.net/odoo:yaltik11
environment:
DB_MAXCONN: 20
XMLRPC_PORT: 8069
LONGPOLLING_PORT: 8072
WORKERS: 2
LIMIT_TIME_CPU: 720
LIMIT_TIME_REAL: 1440
ADMIN_PASSWORD: somethingToChange
LIST_DB: "False"
POSTGRES_USER: odoo
POSTGRES_PASSWORD: somethingToChange
odoocmd:
build:
context: ./scripts

56
odoo/odoo/Dockerfile.11 Normal file
View File

@ -0,0 +1,56 @@
FROM debian:stretch
MAINTAINER Yaltik - Fabien Bourgeois <fabien@yaltik.com>
# Odoo dependencies from Debian APT repository
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential git mercurial curl \
libxml2-dev libxslt1-dev libldap2-dev libsasl2-dev libjpeg-dev libpq-dev \
libfreetype6-dev libssl1.0-dev \
python3-dev python3-setuptools python3-pip python3-renderpm \
nodejs node-less xz-utils \
postgresql-client-9.6
# Handle Node PATH
RUN ln -s /usr/bin/nodejs /usr/bin/node
# WKHTMLTOPDF and fonts
RUN curl -o wkhtmltox.tar.xz -SL https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz \
&& echo '3f923f425d345940089e44c1466f6408b9619562 wkhtmltox.tar.xz' | sha1sum -c - \
&& tar xvf wkhtmltox.tar.xz \
&& cp wkhtmltox/lib/* /usr/local/lib/ \
&& cp wkhtmltox/bin/* /usr/local/bin/ \
&& cp -r wkhtmltox/share/man/man1 /usr/local/share/man/
# Packages cleanup
RUN apt-get purge -y --auto-remove \
&& apt-get clean \
&& rm -r ./wkhtmltox*
# Create odoo user
RUN useradd odoo -md /opt/odoo
# Install OCB 11.0 latest
ENV ODOO_BRANCH 11.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
RUN pip3 install --user -U pip
RUN pip3 install --user -r OCB/requirements.txt
# Launch scripts
COPY ./launch11.sh ./
COPY ./genconf.sh ./
# Post-install tasks
RUN touch odoo.conf
# Odoo default ports
EXPOSE 8069 8072
# Volumes : data dir for filestore and addons
VOLUME /opt/odoo/data
CMD [ "bash", "launch11.sh" ]

7
odoo/odoo/launch11.sh Normal file
View 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