Skip to content

Commit 9409487

Browse files
committed
[FIX] 11.0-13.0: install phonenumbers and use slim images
While phonenumbers is not required to run Odoo, it's a requested nice to have. To avoid a red warning while installing num2words with pip, the Debian backport repository is used. Also use Debian slim images to gain some space. closes #245 and closes #168
1 parent 6ba07c9 commit 9409487

File tree

3 files changed

+18
-6
lines changed

3 files changed

+18
-6
lines changed

11.0/Dockerfile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1-
FROM debian:stretch
1+
FROM debian:stretch-slim
22
MAINTAINER Odoo S.A. <[email protected]>
33

44
# Generate locale C.UTF-8 for postgres and general locale data
55
ENV LANG C.UTF-8
66

7+
# Use backports to avoid install some libs with pip
8+
RUN echo 'deb http://deb.debian.org/debian stretch-backports main' > /etc/apt/sources.list.d/backports.list
9+
710
# Install some deps, lessc and less-plugin-clean-css, and wkhtmltopdf
811
RUN set -x; \
912
apt-get update \
@@ -15,13 +18,16 @@ RUN set -x; \
1518
gnupg \
1619
libssl1.0-dev \
1720
node-less \
21+
python3-num2words \
1822
python3-pip \
23+
python3-phonenumbers \
1924
python3-pyldap \
2025
python3-qrcode \
2126
python3-renderpm \
2227
python3-setuptools \
2328
python3-vobject \
2429
python3-watchdog \
30+
python3-xlwt \
2531
xz-utils \
2632
&& curl -o wkhtmltox.deb -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.stretch_amd64.deb \
2733
&& echo '7e35a63f9db14f93ec7feeb0fce76b30c08f2057 wkhtmltox.deb' | sha1sum -c - \
@@ -55,7 +61,6 @@ RUN set -x; \
5561
&& rm -rf /var/lib/apt/lists/* odoo.deb
5662

5763
# Copy entrypoint script and Odoo configuration file
58-
RUN pip3 install num2words xlwt
5964
COPY ./entrypoint.sh /
6065
COPY ./odoo.conf /etc/odoo/
6166
RUN chown odoo /etc/odoo/odoo.conf

12.0/Dockerfile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1-
FROM debian:stretch
1+
FROM debian:stretch-slim
22
MAINTAINER Odoo S.A. <[email protected]>
33

44
# Generate locale C.UTF-8 for postgres and general locale data
55
ENV LANG C.UTF-8
66

7+
# Use backports to avoid install some libs with pip
8+
RUN echo 'deb http://deb.debian.org/debian stretch-backports main' > /etc/apt/sources.list.d/backports.list
9+
710
# Install some deps, lessc and less-plugin-clean-css, and wkhtmltopdf
811
RUN set -x; \
912
apt-get update \
@@ -15,13 +18,16 @@ RUN set -x; \
1518
gnupg \
1619
libssl1.0-dev \
1720
node-less \
21+
python3-num2words \
1822
python3-pip \
23+
python3-phonenumbers \
1924
python3-pyldap \
2025
python3-qrcode \
2126
python3-renderpm \
2227
python3-setuptools \
2328
python3-vobject \
2429
python3-watchdog \
30+
python3-xlwt \
2531
xz-utils \
2632
&& curl -o wkhtmltox.deb -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.stretch_amd64.deb \
2733
&& echo '7e35a63f9db14f93ec7feeb0fce76b30c08f2057 wkhtmltox.deb' | sha1sum -c - \
@@ -69,7 +75,6 @@ RUN set -x; \
6975
&& rm -rf /var/lib/apt/lists/* odoo.deb
7076

7177
# Copy entrypoint script and Odoo configuration file
72-
RUN pip3 install num2words xlwt
7378
COPY ./entrypoint.sh /
7479
COPY ./odoo.conf /etc/odoo/
7580
RUN chown odoo /etc/odoo/odoo.conf

13.0/Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM debian:buster
1+
FROM debian:buster-slim
22
MAINTAINER Odoo S.A. <[email protected]>
33

44
# Generate locale C.UTF-8 for postgres and general locale data
@@ -16,13 +16,16 @@ RUN set -x; \
1616
libssl-dev \
1717
node-less \
1818
npm \
19+
python3-num2words \
1920
python3-pip \
21+
python3-phonenumbers \
2022
python3-pyldap \
2123
python3-qrcode \
2224
python3-renderpm \
2325
python3-setuptools \
2426
python3-vobject \
2527
python3-watchdog \
28+
python3-xlwt \
2629
xz-utils \
2730
&& curl -o wkhtmltox.deb -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.stretch_amd64.deb \
2831
&& echo '7e35a63f9db14f93ec7feeb0fce76b30c08f2057 wkhtmltox.deb' | sha1sum -c - \
@@ -60,7 +63,6 @@ RUN set -x; \
6063
&& rm -rf /var/lib/apt/lists/* odoo.deb
6164

6265
# Copy entrypoint script and Odoo configuration file
63-
RUN pip3 install num2words xlwt
6466
COPY ./entrypoint.sh /
6567
COPY ./odoo.conf /etc/odoo/
6668
RUN chown odoo /etc/odoo/odoo.conf

0 commit comments

Comments
 (0)