Skip to content

Commit

Permalink
Merge branch '8.0.2.0' of github.com:Elico-Corp/odoo-docker into 10.0…
Browse files Browse the repository at this point in the history
….2.0
  • Loading branch information
seb-elico committed Oct 26, 2017
2 parents e931342 + c5e6c90 commit edbdc04
Show file tree
Hide file tree
Showing 7 changed files with 62 additions and 152 deletions.
112 changes: 35 additions & 77 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,87 +1,23 @@
FROM ubuntu:14.04
FROM ubuntu:16.04
MAINTAINER Elico Corp <[email protected]>

# Define build constants
ENV GIT_BRANCH=10.0 \
PG_VERSION=9.5 \
BINARY_NAME=odoo-bin

# Set timezone to UTC
RUN ln -sf /usr/share/zoneinfo/Etc/UTC /etc/localtime

# generate locales
RUN locale-gen en_US.UTF-8 && update-locale
RUN echo 'LANG="en_US.UTF-8"' > /etc/default/locale

# Add the PostgreSQL PGP key to verify their Debian packages.
# It should be the same key as https://www.postgresql.org/media/keys/ACCC4CF8.asc
RUN apt-key adv --keyserver keyserver.ubuntu.com \
--recv-keys B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8

# Add PostgreSQL's repository. It contains the most recent stable release
# of PostgreSQL.
RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main" > \
/etc/apt/sources.list.d/pgdg.list && \
apt-get update && \
apt-get -yq install \
postgresql-client-$PG_VERSION \
# Install dependencies as distrib packages when system bindings are
# required. Some of them extend the basic Odoo requirements for a better
# "apps" compatibility.
# Most dependencies are distributed as PIP packages at the next step
fontconfig=2.11.0-0ubuntu4.2 \
ghostscript=9.10~dfsg-0ubuntu10.10 \
libxext6=2:1.3.2-1ubuntu0.0.14.04.1 \
libxrender1=1:0.9.8-1build0.14.04.1 \
python=2.7.5-5ubuntu3 \
python-imaging=2.3.0-1ubuntu3.4 \
python-lasso=2.4.0-2build1 \
python-libxslt1=1.1.28-2ubuntu0.1 \
python-pip=1.5.4-1ubuntu4 \
python-pychart=1.39-7build1 \
python-zsi=2.1~a1-3build1 \
xfonts-base=1:1.0.3 \
xfonts-75dpi=1:1.0.3 \
# libpq-dev is needed to install pg_config which is required by psycopg2
libpq-dev=10.0-1.pgdg14.04+1 \
# These libraries are needed to install the PIP modules
libffi-dev=3.1~rc1+r3.0.13-12ubuntu0.2 \
libldap2-dev=2.4.31-1+nmu2ubuntu8.4 \
libsasl2-dev=2.1.25.dfsg1-17build1 \
libssl-dev=1.0.1f-1ubuntu2.22 \
libxml2-dev=2.9.1+dfsg1-3ubuntu4.10 \
libxslt1-dev=1.1.28-2ubuntu0.1 \
python-dev=2.7.5-5ubuntu3 \
# Librairies required for LESS
node-less=1.4.2-1 \
nodejs=0.10.25~dfsg2-2ubuntu1 \
npm=1.3.10~dfsg-1 \
# This library is necessary to upgrade PIL/pillow module
libjpeg8-dev=8c-2ubuntu8 \
# Git is required to clone Odoo OCB project
git=1:1.9.1-1ubuntu0.7
# Generate locales
RUN apt update \
&& apt -yq install locales \
&& locale-gen en_US.UTF-8 \
&& update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8

# Install Odoo python dependencies
ADD sources/pip-req.txt /opt/sources/pip-req.txt
RUN pip install -r /opt/sources/pip-req.txt

# Install LESS
RUN npm install -g [email protected] [email protected] && \
ln -s /usr/bin/nodejs /usr/bin/node

# must unzip this package to make it visible as an odoo external dependency
RUN easy_install -UZ py3o.template==0.9.11
RUN easy_install -UZ py3o.types==0.1.1

# install wkhtmltopdf based on QT5
# Warning: do not use latest version (0.12.2.1) because it causes the footer
# issue (see https://github.com/odoo/odoo/issues/4806)
ADD https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.1/wkhtmltox-0.12.1_linux-trusty-amd64.deb \
/opt/sources/wkhtmltox.deb
RUN dpkg -i /opt/sources/wkhtmltox.deb

# Startup script for custom setup
ADD sources/startup.sh /opt/scripts/startup.sh
# Install APT dependencies
ADD sources/apt.txt /opt/sources/apt.txt
RUN apt update \
&& awk '! /^ *(#|$)/' /opt/sources/apt.txt | xargs -r apt install -yq

# Create the odoo user
RUN useradd --create-home --home-dir /opt/odoo --no-log-init odoo
Expand All @@ -94,16 +30,37 @@ USER odoo
# instead of odoo! Hence the "RUN /bin/bash -c" trick.
RUN /bin/bash -c "mkdir -p /opt/odoo/{etc,sources/odoo,additional_addons,data,ssh}"

# Add Odoo OCB sources and remove .git folder in order to reduce image size
# Add Odoo sources and remove .git folder in order to reduce image size
WORKDIR /opt/odoo/sources
RUN git clone https://github.com/OCA/OCB.git -b $GIT_BRANCH odoo && \
rm -rf odoo/.git
RUN git clone https://github.com/odoo/odoo.git -b $GIT_BRANCH \
&& rm -rf odoo/.git

ADD sources/odoo.conf /opt/odoo/etc/odoo.conf
ADD auto_addons /opt/odoo/auto_addons

User 0

# Install Odoo python dependencies
RUN pip install -r /opt/odoo/sources/odoo/requirements.txt

# Install extra python dependencies
ADD sources/pip.txt /opt/sources/pip.txt
RUN pip install -r /opt/sources/pip.txt

# Install LESS
RUN npm install -g [email protected] [email protected] \
&& ln -s /usr/bin/nodejs /usr/bin/node

# Install wkhtmltopdf based on QT5
# Warning: do not use latest version (0.12.2.1) because it causes the footer
# issue (see https://github.com/odoo/odoo/issues/4806)
ADD https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.1/wkhtmltox-0.12.1_linux-trusty-amd64.deb \
/opt/sources/wkhtmltox.deb
RUN dpkg -i /opt/sources/wkhtmltox.deb

# Startup script for custom setup
ADD sources/startup.sh /opt/scripts/startup.sh

# Provide read/write access to odoo group (for host user mapping). This command
# must run before creating the volumes since they become readonly until the
# container is started.
Expand Down Expand Up @@ -140,3 +97,4 @@ CMD [ "help" ]

# Expose the odoo ports (for linked containers)
EXPOSE 8069 8072

1 change: 0 additions & 1 deletion OCB_COMMIT_ID

This file was deleted.

1 change: 1 addition & 0 deletions ODOO_COMMIT_ID
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
365362a4a0d86701d6f991b3917528d02923b22d
16 changes: 3 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
# elicocorp/odoo
Simple yet powerful [Odoo][odoo] image for [Docker][dk] based on [OCB][ocb]
code and maintained by [Elico Corporation][ec].
Simple yet powerful [Odoo][odoo] image for [Docker][dk] maintained by
[Elico Corporation][ec].

[odoo]: https://www.odoo.com/
[dk]: https://www.docker.com/
[ocb]: https://github.com/OCA/OCB "Odoo Community Backports"
[ec]: https://www.elico-corp.com/

<a name="toc"></a>
Expand Down Expand Up @@ -605,10 +604,6 @@ image [localized for China][odoo-china].
<a name="roadmap"></a>
## Roadmap[^][toc]

* Current list of PIP requirements is maintenained in this repository. It
should use the `https://github.com/OCA/OCB/blob/10.0/requirements.txt` instead.
To be noted that this file is not available in v7.
* Use the standard Odoo code rather than the OCB
* Use the code of `maintainer-quality-tools` to pull the `oca_dependencies.txt`

<a name="bug_tracker"></a>
Expand All @@ -628,12 +623,7 @@ help us smash it by providing detailed and welcomed feedback.
* Sebastien Maillard <[email protected]>
* Eric Caudal <[email protected]>
* Noah Wang <[email protected]>

This image is a fork of [XCG Consulting][xcg] Odoo Docker image available
[here][xcgd].

[xcg]: https://www.xcg-consulting.fr/
[xcgd]: https://hub.docker.com/r/xcgd/odoo/
* Augustin Cisterne-Kaas <[email protected]>

<a name="maintainer"></a>
### Maintainer[^][toc]
Expand Down
18 changes: 18 additions & 0 deletions sources/apt.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
fontconfig=2.11.94-0ubuntu1.1
git=1:2.7.4-0ubuntu1.3
libjpeg-turbo8=1.4.2-0ubuntu3
libldap2-dev=2.4.42+dfsg-2ubuntu3.2
libsasl2-dev=2.1.26.dfsg1-14build1
libssl-dev=1.0.2g-1ubuntu4.8
libxml2-dev=2.9.3+dfsg1-1ubuntu0.3
libxrender1=1:0.9.9-0ubuntu1
libxslt1-dev=1.1.28-2.1ubuntu0.1
node-less=1.6.3~dfsg-2
nodejs=4.2.6~dfsg-1ubuntu4.1
npm=3.5.2-0ubuntu4
postgresql-client-9.5=9.5.9-0ubuntu0.16.04
python-dev=2.7.11-1
python-pip=8.1.1-2ubuntu0.4
sudo=1.8.16-0ubuntu1.5
zlib1g-dev=1:1.2.8.dfsg-2ubuntu4.1

61 changes: 0 additions & 61 deletions sources/pip-req.txt

This file was deleted.

5 changes: 5 additions & 0 deletions sources/pip.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
erppeek==1.6.3
OdooRPC==0.6.0
py3o.template==0.9.11
py3o.types==0.1.1

0 comments on commit edbdc04

Please sign in to comment.