[ADD]Odoo 10 dockerfile and dev files
This commit is contained in:
parent
d01fb03320
commit
0feb0863e7
@ -21,6 +21,14 @@ services:
|
||||
POSTGRES_USER: odoo
|
||||
POSTGRES_PASSWORD: somethingToChange
|
||||
|
||||
odoo10:
|
||||
extends:
|
||||
service: odoo
|
||||
build:
|
||||
context: ./odoo
|
||||
dockerfile: Dockerfile.10
|
||||
image: odoo:10.0
|
||||
|
||||
odoocmd:
|
||||
build: ./scripts
|
||||
image: odoocmd:8.0
|
||||
|
68
odoo/odoo/Dockerfile.10
Normal file
68
odoo/odoo/Dockerfile.10
Normal file
@ -0,0 +1,68 @@
|
||||
FROM debian:jessie
|
||||
MAINTAINER Yaltik - Fabien Bourgeois <fabien@yaltik.com>
|
||||
|
||||
# Odoo dependencies from Debian APT repository
|
||||
# WARNING: libpq, postgresql-client not 95 is a problem ?
|
||||
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 \
|
||||
python-dev python-setuptools python-pip nodejs npm
|
||||
|
||||
# Install NPM dependencies
|
||||
RUN npm install -g less less-plugin-clean-css
|
||||
|
||||
# PostgreSQL 9.5
|
||||
RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main 9.5" \
|
||||
> /etc/apt/sources.list.d/postgresql.list \
|
||||
&& curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - \
|
||||
&& apt-get update \
|
||||
&& apt-get install -y libpq-dev postgresql-client-9.5
|
||||
|
||||
# WKHTMLTOPDF and fonts
|
||||
ENV WKNAME wkhtmltox-0.12.1.2_linux-jessie-amd64.deb
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
libfontenc1 libxfont1 x11-common xfonts-75dpi xfonts-base \
|
||||
xfonts-encodings xfonts-utils \
|
||||
&& curl -LO http://nightly.odoo.com/extra/$WKNAME \
|
||||
&& echo "40e8b906de658a2221b15e4e8cd82565a47d7ee8 $WKNAME" | sha1sum -c - \
|
||||
&& dpkg --force-depends -i $WKNAME \
|
||||
&& apt-get -y install -f --no-install-recommends
|
||||
|
||||
# Packages cleanup
|
||||
RUN apt-get purge -y --auto-remove \
|
||||
&& apt-get clean \
|
||||
&& rm ${WKNAME}
|
||||
|
||||
# Create odoo user
|
||||
RUN useradd odoo -d /opt/odoo
|
||||
|
||||
# Install OCB 8.0 latest
|
||||
ENV ODOO_BRANCH 10.0
|
||||
WORKDIR /opt/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 pip install -U pip
|
||||
RUN pip install -r OCB/requirements.txt --cache-dir pipcache
|
||||
|
||||
# Handle Node PATH
|
||||
RUN ln -s /usr/bin/nodejs /usr/bin/node
|
||||
|
||||
# Launch scripts
|
||||
COPY ./launch10.sh ./
|
||||
COPY ./genconf.sh ./
|
||||
|
||||
# Post-install tasks
|
||||
RUN touch odoo.conf
|
||||
RUN chown -R odoo .
|
||||
|
||||
# Odoo default ports
|
||||
EXPOSE 8069 8072
|
||||
|
||||
# Default user : odoo
|
||||
USER odoo
|
||||
|
||||
# Volumes : data dir for filestore and addons
|
||||
VOLUME /opt/odoo/data
|
||||
|
||||
CMD [ "bash", "launch10.sh" ]
|
7
odoo/odoo/launch10.sh
Normal file
7
odoo/odoo/launch10.sh
Normal file
@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
CONF=/opt/odoo/odoo.conf
|
||||
ODOOCMD="python /opt/odoo/OCB/odoo-bin --config $CONF"
|
||||
|
||||
# Configuration generation and Odoo launch
|
||||
bash genconf.sh && $ODOOCMD
|
Loading…
Reference in New Issue
Block a user