Skip to content

Commit ad407f7

Browse files
committed
feat: build image for Odoo 19
1 parent 0a290b7 commit ad407f7

File tree

8 files changed

+377
-1
lines changed

8 files changed

+377
-1
lines changed

.github/workflows/build.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,13 @@ jobs:
2929
runs-on: ubuntu-latest
3030
strategy:
3131
matrix:
32-
odoo_serie: ["14.0","15.0","16.0","17.0","18.0"]
32+
odoo_serie:
33+
- "14.0"
34+
- "15.0"
35+
- "16.0"
36+
- "17.0"
37+
- "18.0"
38+
- "19.0"
3339

3440
steps:
3541
- uses: actions/checkout@v4

19.0/Dockerfile

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
FROM python:3.12-slim-trixie
2+
ARG UID=999
3+
ARG GID=0
4+
5+
6+
# create the working directory and a place to set the logs (if wanted)
7+
RUN adduser --disabled-password -u $UID --gid $GID --gecos '' odoo \
8+
&& install -m 770 -o odoo -d /odoo /odoo/data /var/log/odoo /odoo/.venv \
9+
/odoo/data/odoo /odoo/data/odoo/{addons,filestore,sessions} \
10+
&& install -m 660 -o odoo /dev/null /odoo/odoo.cfg \
11+
&& install -m 660 -o odoo /dev/null /odoo/.bashrc \
12+
&& usermod odoo --home /odoo
13+
14+
COPY --chown=odoo:root --chmod=770 ./install /install
15+
COPY --chown=odoo:root --chmod=660 ./base_requirements.txt /odoo
16+
COPY --chown=odoo:root --chmod=660 ./extra_requirements.txt /odoo
17+
18+
# Moved because there was a bug while installing `odoo-autodiscover`. There is
19+
# an accent in the contributor name
20+
ENV LANG=C.UTF-8 \
21+
LC_ALL=C.UTF-8
22+
23+
# build and dev packages
24+
ENV BUILD_PACKAGE="\
25+
build-essential \
26+
gcc \
27+
libevent-dev \
28+
libfreetype6-dev \
29+
libxml2-dev \
30+
libxslt1-dev \
31+
libsasl2-dev \
32+
libldap2-dev \
33+
libssl-dev \
34+
libjpeg-dev \
35+
libpng-dev \
36+
zlib1g-dev \
37+
libcairo2-dev"
38+
39+
40+
# Default SHELL is ["/bin/sh", "-c"]
41+
SHELL ["/bin/sh", "-e", "-x", "-c"]
42+
43+
# Install some deps, lessc and less-plugin-clean-css, and wkhtmltopdf
44+
RUN /install/package_odoo.sh \
45+
&& /install/setup-pip.sh \
46+
&& /install/postgres.sh \
47+
&& /install/kwkhtml_client.sh \
48+
&& /install/kwkhtml_client_force_python3.sh \
49+
&& /install/dev_package.sh
50+
51+
# grab dockerize to generate template and
52+
# wait on postgres
53+
RUN /install/dockerize.sh
54+
55+
COPY --chown=odoo:root --chmod=660 ./src_requirements.txt /odoo
56+
COPY --chown=odoo:root --chmod=770 ./bin /odoo/odoo-bin
57+
COPY --chown=odoo:root --chmod=660 ./templates /templates
58+
COPY --chown=odoo:root --chmod=770 ./before-migrate-entrypoint.d /odoo/before-migrate-entrypoint.d
59+
COPY --chown=odoo:root --chmod=770 ./start-entrypoint.d /odoo/start-entrypoint.d
60+
COPY --chown=odoo:root --chmod=770 ./MANIFEST.in /odoo
61+
62+
63+
VOLUME ["/data/odoo", "/var/log/odoo"]
64+
USER odoo
65+
RUN python3 -m venv /odoo/.venv --system-site-packages
66+
ENV PATH=/odoo/.venv/bin:$PATH
67+
ENV PYTHONPATH=/odoo/
68+
RUN echo "export PATH=$PATH" >> ~/.bashrc
69+
70+
RUN /odoo/.venv/bin/pip install -r /odoo/base_requirements.txt
71+
RUN /odoo/.venv/bin/pip install -r /odoo/extra_requirements.txt
72+
USER root
73+
RUN /install/purge_dev_package_and_cache.sh
74+
75+
USER odoo
76+
EXPOSE 8069 8072
77+
78+
ENV ODOO_VERSION=19.0 \
79+
PATH=/odoo/odoo-bin:/odoo/.local/bin:$PATH \
80+
LANG=C.UTF-8 \
81+
LC_ALL=C.UTF-8 \
82+
DB_HOST=db \
83+
DB_PORT=5432 \
84+
DB_NAME=odoodb \
85+
DB_USER=odoo \
86+
DB_PASSWORD=odoo \
87+
ODOO_BASE_URL=http://localhost:8069 \
88+
ODOO_REPORT_URL=http://localhost:8069 \
89+
# the place where you put the data of your project (csv, ...)
90+
ODOO_DATA_PATH=/odoo/data \
91+
DEMO=False \
92+
ADDONS_PATH=/odoo/odoo/addons,/odoo/odoo/src/odoo/addons \
93+
ODOO_RC=/odoo/odoo.cfg
94+
95+
ENTRYPOINT ["docker-entrypoint.sh"]
96+
CMD ["odoo"]

19.0/MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
recursive-include odoo/data *

19.0/base_requirements.txt

Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
# The officially supported versions of the following packages are their
2+
# python3-* equivalent distributed in Ubuntu 24.04 and Debian 12
3+
asn1crypto==1.4.0 ; python_version < '3.11'
4+
asn1crypto==1.5.1 ; python_version >= '3.11'
5+
Babel==2.9.1 ; python_version < '3.11' # min version = 2.6.0 (Focal with security backports)
6+
Babel==2.10.3 ; python_version >= '3.11' and python_version < '3.13'
7+
Babel==2.17.0 ; python_version >= '3.13'
8+
cbor2==5.4.2 ; python_version < '3.12'
9+
cbor2==5.6.2 ; python_version >= '3.12'
10+
chardet==4.0.0 ; python_version < '3.11' # (Jammy)
11+
chardet==5.2.0 ; python_version >= '3.11'
12+
cryptography==3.4.8; python_version < '3.12' # incompatibility between pyopenssl 19.0.0 and cryptography>=37.0.0
13+
cryptography==42.0.8 ; python_version >= '3.12' # (Noble) min 41.0.7, pinning 42.0.8 for security fixes
14+
docutils==0.17 ; python_version < '3.11' # (Jammy)
15+
docutils==0.20.1 ; python_version >= '3.11'
16+
freezegun==1.1.0 ; python_version < '3.11' # (Jammy)
17+
freezegun==1.2.1 ; python_version >= '3.11' and python_version < '3.13'
18+
freezegun==1.5.1 ; python_version >= '3.13'
19+
geoip2==2.9.0
20+
gevent==21.8.0 ; sys_platform != 'win32' and python_version == '3.10' # (Jammy)
21+
gevent==22.10.2; sys_platform != 'win32' and python_version > '3.10' and python_version < '3.12'
22+
gevent==24.2.1 ; sys_platform != 'win32' and python_version >= '3.12' and python_version < '3.13' # (Noble)
23+
gevent==24.11.1 ; sys_platform != 'win32' and python_version >= '3.13' # (Trixie)
24+
greenlet==1.1.2 ; sys_platform != 'win32' and python_version == '3.10' # (Jammy)
25+
greenlet==2.0.2 ; sys_platform != 'win32' and python_version > '3.10' and python_version < '3.12'
26+
greenlet==3.0.3 ; sys_platform != 'win32' and python_version >= '3.12' and python_version < '3.13' # (Noble)
27+
greenlet==3.1.1 ; sys_platform != 'win32' and python_version >= '3.13' # (Trixie)
28+
idna==2.10 ; python_version < '3.12' # requests 2.25.1 depends on idna<3 and >=2.5
29+
idna==3.6 ; python_version >= '3.12'
30+
Jinja2==3.0.3 ; python_version <= '3.10'
31+
Jinja2==3.1.2 ; python_version > '3.10'
32+
libsass==0.20.1 ; python_version < '3.11'
33+
libsass==0.22.0 ; python_version >= '3.11' # (Noble) Mostly to have a wheel package
34+
lxml==4.8.0 ; python_version <= '3.10'
35+
lxml==4.9.3 ; python_version > '3.10' and python_version < '3.12' # min 4.9.2, pinning 4.9.3 because of missing wheels for darwin in 4.9.3
36+
lxml==5.2.1; python_version >= '3.12' # (Noble - removed html clean)
37+
lxml-html-clean; python_version >= '3.12' # (Noble - removed from lxml, unpinned for futur security patches)
38+
MarkupSafe==2.0.1 ; python_version <= '3.10'
39+
MarkupSafe==2.1.2 ; python_version > '3.10' and python_version < '3.12'
40+
MarkupSafe==2.1.5 ; python_version >= '3.12' # (Noble) Mostly to have a wheel package
41+
num2words==0.5.10 ; python_version < '3.12' # (Jammy / Bookworm)
42+
num2words==0.5.13 ; python_version >= '3.12'
43+
ofxparse==0.21
44+
openpyxl==3.0.9 ; python_version < '3.12'
45+
openpyxl==3.1.2 ; python_version >= '3.12'
46+
passlib==1.7.4 # min version = 1.7.2 (Focal with security backports)
47+
Pillow==9.0.1 ; python_version <= '3.10'
48+
Pillow==9.4.0 ; python_version > '3.10' and python_version < '3.12'
49+
Pillow==10.2.0 ; python_version >= '3.12' and python_version < '3.13' # (Noble) Mostly to have a wheel package
50+
Pillow==11.1.0 ; python_version >= '3.13' # (Noble) Mostly to have a wheel package
51+
polib==1.1.1
52+
psutil==5.9.0 ; python_version <= '3.10'
53+
psutil==5.9.4 ; python_version > '3.10' and python_version < '3.12'
54+
psutil==5.9.8 ; python_version >= '3.12' # (Noble) Mostly to have a wheel package
55+
psycopg2==2.9.2 ; python_version == '3.10' # (Jammy)
56+
psycopg2==2.9.5 ; python_version == '3.11'
57+
psycopg2==2.9.9 ; python_version >= '3.12' and python_version < '3.13' # (Noble)
58+
psycopg2==2.9.10 ; python_version >= '3.13' # (Trixie)
59+
pyopenssl==21.0.0 ; python_version < '3.12'
60+
pyopenssl==24.1.0 ; python_version >= '3.12' # (Noble) min 23.2.0, pinned for compatibility with cryptography==42.0.8 and security patches
61+
PyPDF2==1.26.0 ; python_version <= '3.10'
62+
PyPDF2==2.12.1 ; python_version > '3.10'
63+
pypiwin32 ; sys_platform == 'win32'
64+
pyserial==3.5
65+
python-dateutil==2.8.1 ; python_version < '3.11'
66+
python-dateutil==2.8.2 ; python_version >= '3.11'
67+
python-magic==0.4.24; sys_platform != 'win32' and python_version < '3.12' # (jammy)
68+
python-magic==0.4.27; sys_platform != 'win32' and python_version >= '3.12' # (noble)
69+
python-ldap==3.4.0 ; sys_platform != 'win32' and python_version < '3.12' # min version = 3.2.0 (Focal with security backports)
70+
python-ldap==3.4.4 ; sys_platform != 'win32' and python_version >= '3.12' # (Noble) Mostly to have a wheel package
71+
python-stdnum==1.17 ; python_version < '3.11' # (jammy)
72+
python-stdnum==1.19 ; python_version >= '3.11'
73+
pytz # no version pinning to avoid OS perturbations
74+
pyusb==1.2.1
75+
qrcode==7.3.1 ; python_version < '3.11' # (jammy)
76+
qrcode==7.4.2 ; python_version >= '3.11'
77+
reportlab==3.6.8 ; python_version <= '3.10'
78+
reportlab==3.6.12 ; python_version > '3.10' and python_version < '3.12'
79+
reportlab==4.1.0 ; python_version >= '3.12' # (Noble) Mostly to have a wheel package
80+
requests==2.25.1 ; python_version < '3.11' # versions < 2.25 aren't compatible w/ urllib3 1.26. Bullseye = 2.25.1. min version = 2.22.0 (Focal)
81+
requests==2.31.0 ; python_version >= '3.11' # (Noble)
82+
rjsmin==1.1.0 ; python_version < '3.11' # (jammy)
83+
rjsmin==1.2.0 ; python_version >= '3.11'
84+
rl-renderPM==4.0.3 ; sys_platform == 'win32' and python_version >= '3.12' # Needed by reportlab 4.1.0 but included in deb package
85+
urllib3==1.26.5 ; python_version < '3.12' # indirect / min version = 1.25.8 (Focal with security backports)
86+
urllib3==2.0.7 ; python_version >= '3.12' # (Noble) Compatibility with cryptography
87+
vobject==0.9.6.1
88+
Werkzeug==2.0.2 ; python_version <= '3.10'
89+
Werkzeug==2.2.2 ; python_version > '3.10' and python_version < '3.12'
90+
Werkzeug==3.0.1 ; python_version >= '3.12' # (Noble) Avoid deprecation warnings
91+
xlrd==1.2.0 ; python_version < '3.12' # (jammy)
92+
xlrd==2.0.1 ; python_version >= '3.12'
93+
XlsxWriter==3.0.2 ; python_version < '3.12' # (jammy)
94+
XlsxWriter==3.1.9 ; python_version >= '3.12'
95+
xlwt==1.3.0
96+
zeep==4.1.0 ; python_version < '3.11' # (jammy)
97+
zeep==4.2.1 ; python_version >= '3.11' and python_version < '3.13'
98+
zeep==4.3.1 ; python_version >= '3.13'
99+
zope.event==6.0
100+
zope.interface==8.0
101+
setuptools==78.1.1
102+
103+
104+
# Not part of official requirements, but used by some addons
105+
# colorama==0.3.9
106+
gdata==2.0.18
107+
html5lib==1.1
108+
odfpy==1.4.1
109+
pyinotify==0.9.6
110+
simplejson==3.20.1
111+
112+
113+
# Migration tools
114+
# marabunta==0.13.0
115+
-e git+https://github.com/camptocamp/marabunta@master#egg=marabunta
116+
-e git+https://github.com/camptocamp/anthem@master#egg=anthem
117+
118+
# test / lint
119+
# those libs and their dependencies are unpinned
120+
# to always test with the last version of it
121+
flake8
122+
pytest==8.4.2
123+
pluggy
124+
coverage
125+
pytest-odoo>=2.1.3
126+
pytest-cov>=7.0.0
127+
watchdog
128+
129+
# Library dependency
130+
argh==0.31.3
131+
atomicwrites==1.4.1
132+
attrs==25.3.0
133+
beautifulsoup4==4.13.5
134+
future==1.0.0
135+
mccabe==0.7.0
136+
more-itertools==10.8.0
137+
pbr==7.0.1
138+
pexpect==4.9.0
139+
ptyprocess==0.7.0
140+
pycairo==1.28.0
141+
pycodestyle==2.14.0
142+
pyflakes==3.4.0
143+
rl-renderPM==4.0.3
144+
reportlab==4.1.0
145+
unicodecsv==0.14.1
146+
wrapt==1.17.3

19.0/extra_requirements.txt

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Extra python dependencies
2+
algoliasearch==4.26.0
3+
Adyen==13.4.0
4+
cachetools==6.2.0
5+
cerberus==1.3.7
6+
boto3==1.40.30
7+
factur-x==3.8
8+
invoice2data==0.4.5
9+
mailjet-rest==1.5.1
10+
openupgradelib==3.11.1
11+
paramiko==4.0.0
12+
parse-accept-language==0.1.2
13+
paypalrestsdk==1.13.3
14+
phonenumbers==9.0.13
15+
pyquerystring==1.1
16+
pyOpenSSL==25.2.0
17+
pyquerystring==1.1
18+
pysimplesoap==1.16.2
19+
requests-mock==1.12.1
20+
slugify==0.0.1
21+
stripe==12.5.1
22+
unidecode==1.4.0
23+
vcrpy==7.0.0
24+
25+
# Library dependency
26+
asn1crypto==1.5.1
27+
bcrypt==4.3.0
28+
botocore==1.40.30
29+
cffi==2.0.0
30+
cryptography==45.0.7
31+
dateparser==1.2.2
32+
idna==3.10
33+
jmespath==1.0.1
34+
multidict==6.6.4
35+
pdfminer.six==20250506
36+
pyasn1==0.6.1
37+
pycparser==2.23
38+
pycryptodome==3.23.0
39+
PyNaCl==1.6.0
40+
pytesseract==0.3.13
41+
regex==2025.9.1
42+
s3transfer==0.14.0
43+
tzlocal==5.3.1
44+
Unidecode==1.4.0
45+
yarl==1.20.1
46+
47+
#Extra for enterprise
48+
pdfminer==20191125
49+
50+
# Odoo external services dependencies
51+
## PLATFORM
52+
redis==6.2.*
53+
python-json-logger==3.3.*
54+
prometheus-client==0.22.*
55+
56+
# PLATFORM, for azure blob storage
57+
azure-storage-blob==12.16.*
58+
azure-identity==1.13.*

19.0/src_requirements.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Requirements for the project itself and for Odoo.
2+
# When we install Odoo with -e, odoo.py is available in the PATH and
3+
# 'openerp' in the PYTHONPATH
4+
#
5+
# They are installed only after all the project's files have been copied
6+
# into the image (with ONBUILD)
7+
-e .
8+
-e src

19.0/templates/odoo.cfg.tmpl

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
[options]
2+
addons_path = {{ .Env.ADDONS_PATH }}
3+
data_dir = /odoo/data/odoo
4+
auto_reload = False
5+
db_host = {{ .Env.DB_HOST }}
6+
db_name = {{ .Env.DB_NAME }}
7+
db_user = {{ .Env.DB_USER }}
8+
db_password = {{ .Env.DB_PASSWORD }}
9+
db_sslmode = {{ default .Env.DB_SSLMODE "prefer" }}
10+
dbfilter = ^{{ default .Env.DB_FILTER .Env.DB_NAME }}$
11+
list_db = {{ default .Env.LIST_DB "False" }}
12+
admin_passwd = {{ default .Env.ADMIN_PASSWD "" }}
13+
db_maxconn = {{ default .Env.DB_MAXCONN "64" }}
14+
limit_memory_soft = {{ default .Env.LIMIT_MEMORY_SOFT "2147483648" }}
15+
limit_memory_hard = {{ default .Env.LIMIT_MEMORY_HARD "2684354560" }}
16+
limit_request = {{ default .Env.LIMIT_REQUEST "8192" }}
17+
limit_time_cpu = {{ default .Env.LIMIT_TIME_CPU "60" }}
18+
limit_time_real = {{ default .Env.LIMIT_TIME_REAL "120" }}
19+
limit_time_real_cron = {{ default .Env.LIMIT_TIME_REAL_CRON "120" }}
20+
log_handler = {{ default .Env.LOG_HANDLER "':INFO'" }}
21+
log_level = {{ default .Env.LOG_LEVEL "info" }}
22+
max_cron_threads = {{ default .Env.MAX_CRON_THREADS "2" }}
23+
workers = {{ default .Env.WORKERS "4" }}
24+
logfile = {{ default .Env.LOGFILE "None" }}
25+
log_db = {{ default .Env.LOG_DB "False" }}
26+
logrotate = True
27+
syslog = {{ default .Env.SYSLOG "False" }}
28+
running_env = {{ default .Env.RUNNING_ENV "dev" }}
29+
without_demo = {{ default .Env.WITHOUT_DEMO "True" }}
30+
server_wide_modules = {{ default .Env.SERVER_WIDE_MODULES "" }}
31+
; db_sslmode =
32+
; We can activate proxy_mode even if we are not behind a proxy, because
33+
; it is used only if HTTP_X_FORWARDED_HOST is set in environ
34+
proxy_mode = True
35+
; csv_internal_sep = ,
36+
; db_template = template1
37+
; debug_mode = False
38+
; email_from = False
39+
; http_port = 8069
40+
; http_enable = True
41+
; http_interface =
42+
; longpolling_port = 8072
43+
; osv_memory_age_limit = 1.0
44+
; osv_memory_count_limit = False
45+
; smtp_password = False
46+
; smtp_port = 25
47+
; smtp_server = localhost
48+
; smtp_ssl = False
49+
; smtp_user = False
50+
unaccent = {{ default .Env.UNACCENT "False" }}
51+
{{ default .Env.ADDITIONAL_ODOO_RC "" }}

19.0/test_requirements.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# test / lint
2+
# those libs and their dependencies are unpinned
3+
# to always test with the last version of it
4+
flake8
5+
pytest==8.3.2
6+
pluggy
7+
coverage
8+
pytest-odoo>=0.4.7
9+
pytest-cov>=2.10.0
10+
watchdog

0 commit comments

Comments
 (0)