-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile
101 lines (81 loc) · 2.77 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
95
96
97
98
99
100
101
# THIS WORK IS BASED ON THE ODOO DOCKER REPO
FROM debian:bookworm-slim
SHELL ["/bin/bash", "-xo", "pipefail", "-c"]
# Generate locale C.UTF-8 for postgres and general locale data
ENV LANG C.UTF-8
# Retrieve the target architecture to install the correct wkhtmltopdf package
ARG TARGETARCH
# Install some deps, lessc and less-plugin-clean-css, and wkhtmltopdf
RUN apt-get update && \
apt-get install -y --no-install-recommends \
ca-certificates \
curl \
dirmngr \
fonts-noto-cjk \
gnupg \
libssl-dev \
node-less \
npm \
nano \
python3-magic \
python3-num2words \
python3-odf \
python3-pdfminer \
python3-pip \
python3-phonenumbers \
python3-pyldap \
python3-qrcode \
python3-renderpm \
python3-setuptools \
python3-slugify \
python3-vobject \
python3-watchdog \
python3-xlrd \
python3-xlwt \
xz-utils
RUN apt-get install -y wkhtmltopdf
# install latest postgresql-client
RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ bookworm-pgdg main' > /etc/apt/sources.list.d/pgdg.list \
&& GNUPGHOME="$(mktemp -d)" \
&& export GNUPGHOME \
&& repokey='B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8' \
&& gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "${repokey}" \
&& gpg --batch --armor --export "${repokey}" > /etc/apt/trusted.gpg.d/pgdg.gpg.asc \
&& gpgconf --kill all \
&& rm -rf "$GNUPGHOME" \
&& apt-get update \
&& apt-get install --no-install-recommends -y postgresql-client \
&& rm -f /etc/apt/sources.list.d/pgdg.list \
&& rm -rf /var/lib/apt/lists/*
# Install rtlcss (on Debian buster)
RUN npm install -g rtlcss
# Install Odoo
RUN curl -o odoo.deb -sSL http://nightly.odoo.com/17.0/nightly/deb/odoo_17.0.latest_all.deb
RUN apt-get update
RUN apt-get -y install --no-install-recommends ./odoo.deb
RUN rm -rf /var/lib/apt/lists/* odoo.deb
# Copy entrypoint script and Odoo configuration file
COPY ./entrypoint.sh /
COPY ./odoo.conf /
RUN ls -la /etc/odoo/
RUN chmod 777 /entrypoint.sh
# Set permissions and Mount /var/lib/odoo to allow restoring filestore and /mnt/extra-addons for users addons
RUN chown odoo /odoo.conf \
&& mkdir -p /mnt/extra-addons \
&& chown -R odoo /mnt/extra-addons
RUN ls -la /etc/odoo/
VOLUME ["/var/lib/odoo", "/mnt/extra-addons"]
RUN ls -la /etc/odoo/
# Expose Odoo services
EXPOSE 8069 8071 8072
# Set the default config file
ENV ODOO_RC /odoo.conf
COPY wait-for-psql.py /usr/local/bin/wait-for-psql.py
RUN chmod 777 /usr/local/bin/wait-for-psql.py
RUN ls -la /etc/odoo/
# Set default user when running the container
USER odoo
ENTRYPOINT ["/entrypoint.sh"]
CMD ["odoo"]
RUN ls -la /etc/odoo/
RUN cat /etc/odoo/odoo.conf