forked from qrtl/odoo-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
94 lines (79 loc) · 2.64 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
FROM ubuntu:18.04
MAINTAINER Quartile Limited <[email protected]>
RUN apt-get update && apt-get install -y gnupg
# Update source repository
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8 \
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg main" > /etc/apt/sources.list.d/pgdg.list \
&& apt-get update
# Set Environment Variable
ENV LC_ALL=C.UTF-8
# Install dependencies and tools
RUN set -x; \
apt-get install -yq --no-install-recommends \
curl \
python3-pip \
# Libraries needed to install the pip modules (libpq-dev for pg_config > psycopg2)
python3-dev \
# to install portable C which is a distant dependency for pysftp
libffi-dev \
libxml2-dev \
libxslt1-dev \
libldap2-dev \
libsasl2-dev \
libssl-dev \
python3-setuptools \
build-essential \
# For database management
postgresql-client-10 \
# GeoIP related
# geoip-database-contrib \
libgeoip-dev \
# For getting Odoo code
git
# Install Odoo Python dependencies.
ADD requirements.txt /opt/requirements.txt
RUN python3 -m pip install --upgrade pip \
&& pip3 install -r /opt/requirements.txt
&& pip3 install pandas
# Install LESS
RUN set -x; \
apt-get install -y --no-install-recommends \
node-less
# Install wkhtmltox 0.12.5
RUN apt-get install -y software-properties-common \
&& apt-add-repository -y "deb http://security.ubuntu.com/ubuntu xenial-security main" \
&& apt-get update
ADD https://downloads.wkhtmltopdf.org/0.12/0.12.5/wkhtmltox_0.12.5-1.xenial_amd64.deb /opt/sources/wkhtmltox.deb
RUN set -x; \
apt-get install -y --no-install-recommends \
libxrender1 \
libfontconfig1 \
libx11-dev \
libjpeg62 \
libxtst6 \
fontconfig \
xfonts-75dpi \
xfonts-base \
libpng12-0 \
libjpeg-turbo8 \
&& dpkg -i /opt/sources/wkhtmltox.deb \
&& rm -rf /opt/sources/wkhtmltox.deb
# Add odoo user (apply the same in the host machine for compatibility)
RUN addgroup --gid=300 odoo && adduser --system --uid=300 --gid=300 --home /odoo --shell /bin/bash odoo
# Add boot script
COPY ./odooboot /
RUN chmod +x /odooboot
# Get Odoo code
WORKDIR /opt
RUN set -x; \
git clone --depth 1 https://github.com/eqilibruim501/odoo.git -b 13.0 \
&& rm -rf odoo/.git
# Change directory owner
RUN chown -R odoo: /odoo /opt/odoo
# Install Supervisord.
# For some reason the boot script does not work (container exits...) when it is directly set to entrypoint.
RUN apt-get install -y supervisor
COPY ./supervisord.conf /etc/supervisor/conf.d/
VOLUME ["/odoo", "/usr/share/fonts"]
EXPOSE 8069 8072
ENTRYPOINT ["/usr/bin/supervisord"]