-
Notifications
You must be signed in to change notification settings - Fork 7
/
Dockerfile
90 lines (77 loc) · 2.88 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
FROM ursa/ubuntu-18.04:latest
MAINTAINER Open Source Integrators <[email protected]>
# Install some deps, lessc and less-plugin-clean-css, and wkhtmltopdf
RUN apt update \
&& apt install -y --no-install-recommends \
ca-certificates \
curl \
dirmngr \
fonts-noto-cjk \
gnupg \
gosu \
gsfonts \
libssl-dev \
node-less \
# npm \
# python3-num2words \
python3-pip \
python3-phonenumbers \
python3-pyldap \
python3-qrcode \
python3-renderpm \
python3-setuptools \
python3-slugify \
python3-vobject \
python3-watchdog \
python3-wheel \
python3-xlrd \
# python3-xlwt \
xz-utils \
&& curl -o wkhtmltox.deb -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.bionic_amd64.deb \
&& echo 'f1689a1b302ff102160f2693129f789410a1708a wkhtmltox.deb' | sha1sum -c - \
&& apt install -y --no-install-recommends ./wkhtmltox.deb \
&& rm -rf /var/lib/apt/lists/* wkhtmltox.deb
# Install Rclone
RUN curl https://rclone.org/install.sh | bash
# install nodejs from ppa
RUN curl -sL https://deb.nodesource.com/setup_14.x -o nodesource_setup.sh \
&& bash nodesource_setup.sh \
&& apt install -y nodejs \
&& rm -rf nodesource_setup.sh
# install latest postgresql-client
ENV PGVERSION=13
RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ bionic-pgdg main' > /etc/apt/sources.list.d/pgdg.list \
&& curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - \
&& apt update \
&& apt install --no-install-recommends -y postgresql-client-$PGVERSION \
&& rm -f /etc/apt/sources.list.d/pgdg.list \
&& rm -rf /var/lib/apt/lists/*
# Install Odoo
ENV ODOO_VERSION 13.0
ARG ODOO_RELEASE=latest
RUN curl -o odoo.deb -sSL http://nightly.odoo.com/${ODOO_VERSION}/nightly/deb/odoo_${ODOO_VERSION}.${ODOO_RELEASE}_all.deb \
&& apt update \
&& apt -y install --no-install-recommends ./odoo.deb \
&& rm -rf /var/lib/apt/lists/* odoo.deb
RUN mkdir -p /odoo/addons /odoo/data
# Copy entrypoint script and Odoo configuration file
COPY entrypoint.sh /
COPY templates /odoo/templates
COPY requirements.txt /odoo/
COPY wait-for-psql.py /usr/local/bin/wait-for-psql.py
# Copy Odoo addons
COPY src/odoo-cloud-platform/attachment_azure /odoo/addons/attachment_azure
COPY src/odoo-cloud-platform/attachment_s3 /odoo/addons/attachment_s3
COPY src/odoo-cloud-platform/base_attachment_object_storage /odoo/addons/base_attachment_object_storage
COPY src/odoo-cloud-platform/monitoring_status /odoo/addons/monitoring_status
COPY src/odoo-cloud-platform/session_redis /odoo/addons/session_redis
# Expose Odoo services
EXPOSE 8069 8072
RUN python3 -m pip install --upgrade pip
RUN pip3 install -r /odoo/requirements.txt
RUN chown -R odoo /odoo
# Set the default config file
ENV ODOO_RC /odoo/odoo.conf
VOLUME /odoo/data
ENTRYPOINT ["/entrypoint.sh"]
CMD ["odoo"]