Compare commits

...

193 Commits

Author SHA1 Message Date
51295e2011
update entrypoint to seperate db_arg for odoo and python wait-for-pgql.py script
All checks were successful
Build, Secure, and Push Docker Image on Release / build-and-push (release) Successful in 3m29s
2024-12-30 14:33:26 -05:00
c0622e2428
set proper path for the container to be build
All checks were successful
Build, Secure, and Push Docker Image on Release / build-and-push (release) Successful in 3m30s
2024-12-30 14:18:26 -05:00
8be0ce82f6
added DB_NAME env variable and added gitea workflow to publish the container
Some checks failed
Build, Secure, and Push Docker Image on Release / build-and-push (release) Failing after 6s
2024-12-30 14:16:51 -05:00
Christophe Monniez
6b73961808 [REF] Odoo 16.0-18.0: update to release 20241220 2024-12-20 15:50:55 +01:00
Christophe Monniez
beb0b7ff25 [REF] Odoo 16.0-18.0: update to release 20241209 2024-12-09 12:09:29 +01:00
Christophe Monniez
5c9e504bfb [REF] Odoo 16.0-18.0: update to release 20241125 2024-11-25 10:49:34 +01:00
Christophe Monniez
593824b673 [REF] Odoo 16.0-18.0: update to release 20241118 2024-11-18 10:26:19 +01:00
Christophe Monniez
5d79fb3b29 [REF] Odoo 16.0-18.0: update to release 20241108 2024-11-08 11:31:04 +01:00
Christophe Monniez
acacd14c9c [REF] Odoo 16.0-18.0: update to release 20241029 2024-10-29 14:56:14 +01:00
Christophe Monniez
decdaff7f9 [REF] Odoo 16.0-18.0: update to release 20241017 2024-10-17 15:36:11 +02:00
Christophe Monniez
282f5a3761 [ADD] Odoo: 18.0 2024-10-07 10:31:27 +02:00
Christophe Monniez
9072f9d992 [REF] Odoo 16.0-17.0: update to release 20241007 2024-10-07 09:26:06 +02:00
Christophe Monniez
190cdb6c0f [REM] Odoo 15.0: remove deprecated version 2024-10-07 09:24:32 +02:00
Christophe Monniez
5fb6a84274 [REF] Odoo 15.0-17.0: update to release 20240924 2024-09-24 09:24:50 +02:00
Christophe Monniez
36079c9de8 [REF] Odoo 15.0-17.0: update to release 20240912 2024-09-12 11:27:03 +02:00
Christophe Monniez
e0227fd3dc [REF] Odoo 15.0-17.0: update to release 20240904 2024-09-04 11:14:36 +02:00
Christophe Monniez
b6411dfc53 [REF] Odoo 15.0-17.0: update to release 20240826 2024-08-26 10:31:43 +02:00
Christophe Monniez
0c03225b38 [REF] Odoo 15.0-17.0: update to release 20240819 2024-08-19 08:45:14 +02:00
Christophe Monniez
801d34e4b4 [REF] Odoo 15.0-17.0: update to release 20240812 2024-08-12 13:24:22 +02:00
Christophe Monniez
b4cccf3cca [REF] Odoo 15.0-17.0: update to release 20240809 2024-08-09 11:39:22 +02:00
Christophe Monniez
0a794bf1c2 [REF] Odoo 15.0-17.0: update to release 20240730 2024-07-30 14:28:55 +02:00
Christophe Monniez
c8297f5332 [REF] Odoo 15.0-17.0: update to release 20240711 2024-07-11 11:17:21 +02:00
Christophe Monniez
a25c36df57 [REF] Odoo 15.0-17.0: update to release 20240624 2024-06-24 11:13:48 +02:00
Christophe Monniez
30416a3c40 [REF] Odoo 15.0-17.0: update to release 20240603 2024-06-03 10:31:02 +02:00
Christophe Monniez
ea74918b21 [REF] Odoo 15.0-17.0: update to release 20240522 2024-05-22 14:05:22 +02:00
Christophe Monniez
28c9d0656e [REF] Odoo 15.0-17.0: update to release 20240513 2024-05-13 16:22:29 +02:00
Christophe Monniez
67e07c2791 [REF] Odoo 15.0-17.0: update to release 20240429 2024-04-29 16:21:20 +02:00
Christophe Monniez
ddcea34c26 [REF] Odoo 15.0-17.0: update to release 20240416 2024-04-16 14:49:53 +02:00
Christophe Monniez
3f5fb1e41a [REF] Odoo 15.0-17.0: update to release 20240405 2024-04-05 10:10:08 +02:00
Christophe Monniez
0daa6ed770 [REF] Odoo 15.0-17.0: update to release 20240325 2024-03-25 11:29:10 +01:00
Christophe Monniez
f2d27b791f [REF] Odoo 15.0-17.0: update to release 20240312 2024-03-12 09:02:14 +01:00
Christophe Monniez
877f72dd0a [REF] Odoo 15.0-17.0: update to release 20240229 2024-02-29 10:31:40 +01:00
Christophe Monniez
35fea9ea1f [REF] Odoo 15.0-17.0: update to release 20240216 2024-02-16 10:25:49 +01:00
Christophe Monniez
bcfe0ba461 [REF] Odoo 15.0-17.0: update to release 20240209 2024-02-09 15:51:45 +01:00
Christophe Monniez
218ae7120f [REF] Odoo 15.0-17.0: update to release 20240126 2024-01-26 15:23:34 +01:00
Christophe Monniez
45ad277d0e [REF] Odoo 15.0-17.0: update to release 20240115 2024-01-15 11:38:32 +01:00
Christophe Monniez
c6ef467e92 [REF] Odoo 15.0-17.0: update to release 20240104 2024-01-04 09:45:28 +01:00
Christophe Monniez
24b54cae67 [REF] Odoo 15.0-17.0: update to release 20231222 2023-12-22 14:28:18 +01:00
Christophe Monniez
5b67879040 [REF] Odoo 15.0-17.0: update to release 20231215 2023-12-15 10:40:22 +01:00
Christophe Monniez
930f56df40 [REF] Odoo 15.0-17.0: update to release 20231208 2023-12-08 14:34:09 +01:00
Christophe Monniez
c8eeb99e72 [REF] Odoo 15.0-17.0: update to release 20231127 2023-11-27 10:08:19 +01:00
Christophe Monniez
d669144f88 [REF] Odoo 15.0-17.0: update to release 20231120 2023-11-20 13:30:33 +01:00
Christophe Monniez
37a68eedff [ADD] Odoo: 17.0 2023-11-13 11:50:34 +01:00
Christophe Monniez
4ffdeb646f [REF] odoo 15.0-16.0: update to release 20231113 2023-11-13 11:48:28 +01:00
Christophe Monniez
0063771a04 [REM] Odoo 14.0: remove deprecated version 2023-11-10 09:52:12 +01:00
Christophe Monniez
3864188c94 [FIX] Odoo 16.0: handle goarch and dpkg arch output
On ppc64le, the output of `dpkg --print-architecture` is `ppc64el`while
the goarch value is `ppc64le`.

So wkhtmltopdf would not be installed if the Dockerfile is built on a
ppc64le without using the TARGETARCH arg.

With this commit, this case is also handled.
2023-11-06 15:16:33 +01:00
Christophe Monniez
9024ebefc3 [REF] Odoo 14.0-16.0: update to release 20231106 2023-11-06 15:04:57 +01:00
Christophe Monniez
9b5e2cf27b [FIX] Odoo 16.0: use dpkg to find build architecture
As the docker-library doesn't use TARGETARCH yet, this commit set that
variable by using `dpk --print-architecture` when the variable is not set.
2023-10-26 11:05:05 +02:00
Christophe Monniez
8a93c61c02 [REF] Odoo 14.0-16.0: update to release 20231024 2023-10-24 08:46:31 +02:00
Ludovic Gasc
d98cfdf610 [REF] Odoo 16.0: Add support of ppc64le and arm64 2023-10-24 08:44:30 +02:00
Christophe Monniez
d04d885eea [REF] Odoo 14.0-16.0: update to release 20230925 2023-09-25 08:46:28 +02:00
Christophe Monniez
61148a86ee [REF] Odoo 14.0-16.0: update to release 20230908 2023-09-08 15:26:19 +02:00
Christophe Monniez
84abbabfd7 [REF] Odoo 14.0-16.0: update to release 20230901 2023-09-01 15:38:26 +02:00
Christophe Monniez
5a2479f0a2 [REF] Odoo 14.0-16.0: update to release 20230825 2023-08-25 10:02:12 +02:00
Christophe Monniez
5a58ae0937 [REF] Odoo 14.0-16.0: update to release 20230816 2023-08-16 15:53:53 +02:00
Christophe Monniez
bab3af7077 [REF] Odoo 14.0-16.0: update to release 20230807 2023-08-07 16:32:00 +02:00
Christophe Monniez
80cde78131 [REF] Odoo 14.0-16.0: update to release 20230720 2023-07-20 14:44:06 +02:00
Christophe Monniez
36d6e05b76 [REF] Odoo 14.0-16.0: update to release 20230710 2023-07-10 09:07:28 +02:00
Christophe Monniez
672d5cda91 [REF] Odoo 14.0-16.0: update to release 20230629 2023-06-29 10:12:24 +02:00
Christophe Monniez
7a71692507 [REF] Odoo 14.0-16.0: update to release 20230613 2023-06-13 14:52:34 +02:00
Christophe Monniez
d53cb2ceb0 16.0: add python3-magic and python3-odf
While not strictly required, those packages may improve the user
experience.
2023-06-05 13:45:47 +02:00
Christophe Monniez
42cc6f7d3a [REF] Odoo 14.0-16.0: update to release 20230530 2023-05-30 10:56:24 +02:00
Christophe Monniez
789b7ff9dc [REF] Odoo 14.0-16.0: update to release 20230517 2023-05-17 14:53:49 +02:00
Christophe Monniez
f7b3182bdc [REF] Odoo 14.0-16.0: update to release 20230430 2023-04-30 09:13:00 +02:00
Christophe Monniez
df8788b1e0 [REF] Odoo 14.0-16.0: update to release 20230418 2023-04-18 14:36:53 +02:00
Christophe Monniez
8be11ad877 [REF] Odoo 14.0-16.0: update to release 20230329 2023-03-29 12:16:06 +02:00
Christophe Monniez
c61918a027 [REF] Odoo 14.0-16.0: update to release 20230317 2023-03-17 09:43:52 +01:00
Christophe Monniez
870aef4a7a [REF] Odoo 14.0-16.0: update to release 20230310 2023-03-10 13:28:11 +01:00
Christophe Monniez
ff99b5f501 [REF] Odoo 14.0-16.0: update to release 20230224 2023-02-24 14:15:19 +01:00
Christophe Monniez
2c634b7e37 [REF] Odoo 14.0-16.0: update to release 20230210 2023-02-10 16:57:12 +01:00
Christophe Monniez
9674beb8a5 [REF] Odoo 14.0-16.0: update to release 20230109 2023-01-09 10:41:44 +01:00
Christophe Monniez
bd0749b2bf [REF] Odoo 14.0-16.0: update to release 20221226 2022-12-26 09:49:03 +01:00
Christophe Monniez
4dc567d99e [REF] Odoo 14.0-16.0: update to release 20221216 2022-12-16 14:26:57 +01:00
Christophe Monniez
7f1788b597 [REF] Odoo 14.0-16.0: update to release 20221202 2022-12-02 10:00:45 +01:00
Christophe Monniez
456817151a [REF] Odoo 14.0-16.0: update to release 20221116 2022-11-16 09:52:29 +01:00
Christophe Monniez
0d7a76b1e4 [REF] Odoo 14.0-16.0: update to release 20221104 2022-11-04 14:48:15 +01:00
Christophe Monniez
7f37c5532e [REF] Odoo 14.0-16.0: update to release 20221025 2022-10-25 13:50:38 +02:00
Christophe Monniez
ad549a7c36 [ADD] Odoo: 16.0 2022-10-12 16:41:02 +02:00
Christophe Monniez
bb1557df5b [REF] Odoo 14.0-15.0: bump to release 20221012 2022-10-12 16:39:40 +02:00
Christophe Monniez
bf355c8dd0 [REM] Odoo 13.0: remove deprecated version 2022-10-12 16:31:52 +02:00
Christophe Monniez
26df6d6eef [REF] Odoo 13.0-15.0: update to release 20221005 2022-10-05 13:23:51 +02:00
Christophe Monniez
333b109550 [REF] Odoo 13.0-15.0: update to release 20220915 2022-09-15 11:01:32 +02:00
Christophe Monniez
4550ffdc74 [REF] Odoo 13.0-15.0: update to release 20220902 2022-09-02 08:26:19 +02:00
Christophe Monniez
4174d74ed1 [REF] Odoo 13.0-15.0: update to release 20220826 2022-08-26 15:32:15 +02:00
Christophe Monniez
774bbf90ef [REF] Odoo 13.0-15.0: update to release 20220819 2022-08-19 09:15:18 +02:00
Christophe Monniez
2cfc36507e [REF] Odoo 13.0-15.0: update to release 20220812 2022-08-12 08:57:05 +02:00
Christophe Monniez
d0da651ee7 [REF] Odoo 13.0-15.0: update to release 20220727 2022-07-27 08:56:02 +02:00
Christophe Monniez
0373100711 [REF] Odoo 13.0-15.0: update to release 20220718 2022-07-18 08:33:17 +02:00
Christophe Monniez
cbd79f009a [REF] Odoo 13.0-15.0: update to release 20220708 2022-07-08 15:27:15 +02:00
Christophe Monniez
69194a6afa [REF] Odoo 13.0-15.0: update to release 20220629 2022-06-29 15:19:59 +02:00
Christophe Monniez
cea2870f5c [REF] Odoo 13.0-15.0: update to release 20220620 2022-06-20 08:54:12 +02:00
Christophe Monniez
8358407bd9 [REF] Odoo 13.0-15.0: update to release 20220609 2022-06-09 09:18:13 +02:00
Christophe Monniez
4184e82736 [REF] Odoo 13.0-15.0: update to release 20220531 2022-05-31 11:20:01 +02:00
Christophe Monniez
545e19bca1 [REF] Odoo 13.0-15.0: update to release 20220520 2022-05-20 13:09:06 +02:00
Christophe Monniez
9264df22a6 [REF] Odoo 13.0-15.0: update to release 20220506 2022-05-06 15:49:45 +02:00
Christophe Monniez
1649d6cc0e [REF] Odoo 13.0-15.0: update to release 20220425 2022-04-25 15:12:11 +02:00
Christophe Monniez
f2933c5158 [REF] Odoo 13.0-15.0: update to release 20220401 2022-04-01 10:01:46 +02:00
Christophe Monniez
9913d13c50 [REF] Odoo 13.0-15.0: update to release 20220325 2022-03-25 09:53:47 +01:00
Christophe Monniez
3b93ef1d1b [REF] Odoo 13.0-15.0: update to release 20220317 2022-03-17 13:06:55 +01:00
Christophe Monniez
912599984d [REF] Odoo 13.0-15.0: update to release 20220307 2022-03-07 16:43:01 +01:00
Christophe Monniez
f0cd6329a4 [REF] Odoo 13.0-15.0: update to release 20220225 2022-02-25 10:14:56 +01:00
Christophe Monniez
a88f54774e [REF] Odoo 13.0-15.0: update to release 20220217 2022-02-17 09:56:11 +01:00
Christophe Monniez
3a872aba15 [REF] Odoo 13.0-15.0: update to release 20220204 2022-02-04 17:05:00 +01:00
Christophe Monniez
7d0956a5da [REF] Odoo 13.0-15.0: update to release 20220126 2022-01-26 12:04:19 +01:00
Christophe Monniez
9c6f67fcc5 [REF] Odoo 13.0-15.0: update to release 20220110 2022-01-10 16:55:32 +01:00
Christophe Monniez
51548ef50f [REF] Odoo 13.0-15.0: update to release 20211229 2021-12-29 11:50:47 +01:00
Christophe Monniez
301937f44c [REF] Odoo 13.0-15.0: update to release 20211220 2021-12-20 10:51:02 +01:00
Christophe Monniez
c9691f91be [REF] Odoo 13.0-15.0: update to release 20211213 2021-12-13 11:14:52 +01:00
Christophe Monniez
e5654cfab3 [REF] Odoo 13.0-15.0: update to release 20211201 2021-12-01 15:48:13 +01:00
Christophe Monniez
c51eacfe2a [REF] Odoo 13.0-15.0: update to release 20211119 2021-11-19 09:34:25 +01:00
Christophe Monniez
9c3d1ccd19 [REF] Odoo 13.0-15.0: update to release 20211110 2021-11-10 16:56:06 +01:00
Christophe Monniez
fb468f57e0 [REF] Odoo 13.0-15.0: update to release 20211029 2021-10-29 14:40:36 +02:00
Christophe Monniez
dc50f63c24 [FIX] Odoo 15.0: remove temporary fix 2021-10-29 13:50:43 +02:00
Christophe Monniez
bb44f3916c [REF] Odoo 13.0-15.0: update to release 20211018 2021-10-18 09:34:31 +02:00
Christophe Monniez
e6d26592e6 [ADD] Odoo: 15.0
A temporary fix was added to install gsfonts and python3-openssl.
They will be removed once the Odoo deb package is fixed and merged.
2021-10-07 15:52:56 +02:00
Christophe Monniez
03840f1cf9 [REF] Odoo 13.0-14.0: bump to release 20211007 2021-10-07 13:36:29 +02:00
Christophe Monniez
69ab15cc5c [REM] Odoo 12.0: remove deprecated version 2021-10-07 09:07:18 +02:00
Christophe Monniez
4f79a47add [REF] Odoo 12.0-14.0: update to release 20211006 2021-10-06 10:46:20 +02:00
Christophe Monniez
79c66cd4f3 [REF] Odoo 12.0-14.0: update to release 20210921 2021-09-21 11:17:17 +02:00
Christophe Monniez
9b80fd1684 [REF] Odoo 12.0-14.0: update to release 20210913 2021-09-13 11:32:46 +02:00
Christophe Monniez
9534c8c2fd [REF] Odoo 12.0-14.0: update to release 20210903 2021-09-03 15:51:42 +02:00
Christophe Monniez
233277f7be [IMP] Odoo 12.0-13.0: add support for docker secret
In order to avoid postgresql password in an environment variable, a
PASSWORD_FILE environment may be used instead.

This allow the usage of secrets in docker-compose [0]

[0](https://github.com/compose-spec/compose-spec/blob/master/spec.md#secrets)
2021-08-09 15:51:56 +02:00
Christophe Monniez
27f9e7e8ed [REF] Odoo 12.0-14.0: update to release 20210809 2021-08-09 08:38:36 +02:00
Christophe Monniez
b07c4f35b4 [REF] Odoo 12.0-14.0: update to release 20210728 2021-07-28 10:46:37 +02:00
Christophe Monniez
42923bb50c [REF] Odoo 12.0-14.0: update to release 20210720 2021-07-20 11:02:56 +02:00
Christophe Monniez
563544203e [REF] Odoo 12.0-14.0: update to release 20210713 2021-07-13 09:16:27 +02:00
Christophe Monniez
31fb0a3b34 [REF] Odoo 12.0-14.0: update to release 20210702 2021-07-02 09:30:56 +02:00
Christophe Monniez
ab85af5589 [REF] Odoo 12.0-14.0: update to release 20210618 2021-06-18 13:11:25 +02:00
Christophe Monniez
aa6f1bb98f [REF] Odoo 12.0-14.0: update to release 20210609 2021-06-09 08:09:36 +02:00
Christophe Monniez
6d95b778cf [REF] Odoo 12.0-14.0: update to release 20210525 2021-05-25 08:42:20 +02:00
Christophe Monniez
574de4ccbb [REF] Odoo 12.0-14.0: update to release 20210518 2021-05-18 12:05:02 +02:00
Christophe Monniez
c963853d00 [REF] Odoo 12.0-14.0: update to release 20210506 2021-05-06 09:02:42 +02:00
Christophe Monniez
ce4d60e845 [REF] Odoo 12.0-14.0: update to release 20210427 2021-04-27 08:34:20 +02:00
Christophe Monniez
dea339fddc [REF] Odoo 12.0-14.0: update to release 20210419 2021-04-19 11:11:39 +02:00
Christophe Monniez
59b76d6aa3 [REF] Odoo 12.0-14.0: update to release 20210407 2021-04-07 09:29:40 +02:00
Christophe Monniez
ece2519a00 [REF] Odoo 12.0-14.0: update to release 20210330 2021-03-30 09:07:59 +02:00
Christophe Monniez
d76e5a9120 [REF] Odoo 12.0-14.0: update to release 20210318 2021-03-18 09:08:57 +01:00
Christophe Monniez
99e3de2f03 [REF] Odoo 12.0-14.0: update to release 20210308 2021-03-08 08:03:56 +01:00
Christophe Monniez
ef15321cdd [REF] Odoo 12.0-14.0: update to release 20210226 2021-02-26 13:40:39 +01:00
Christophe Monniez
f8212600f6 [REF] Odoo 12.0-14.0: update to release 20210217 2021-02-17 08:22:18 +01:00
Christophe Monniez
6fb83876d0 [REF] Odoo 12.0-14.0: update to release 20210210 2021-02-10 09:57:03 +01:00
Christophe Monniez
44a0a3f1b3 [REF] Odoo 12.0-14.0: update to release 20210204 2021-02-04 11:20:42 +01:00
Christophe Monniez
8b937ea813 [REF] Odoo 12.0-14.0: update to release 20210111 2021-01-11 09:01:19 +01:00
Christophe Monniez
5bf43c2893 [REF] Odoo 12.0-14.0: update to release 20210104 2021-01-04 08:24:26 +01:00
Christophe Monniez
b23832c33a [REF] Odoo 12.0-14.0: update to release 20201218 2020-12-18 15:22:14 +01:00
Christophe Monniez
a825afde09 [REF] Odoo 12.0-14.0: update to release 20201208 2020-12-08 10:25:53 +01:00
Christophe Monniez
920582ed77 [REF] Odoo 12.0-14.0: update to release 20201123 2020-11-23 14:31:16 +01:00
Christophe Monniez
867c2ae684 [REF] Odoo 12.0-14.0: update to release 20201112 2020-11-12 09:01:38 +01:00
Christophe Monniez
b5260037cb [REF] Odoo 12.0-14.0: update to release 20201026 2020-10-26 11:45:44 +01:00
Christophe Monniez
01aed14a6d [FIX] Odoo 13.0-14.0: update wkhtmltox sha1 sum
Oversight in PR #327.

Closes #328
2020-10-19 09:50:34 +02:00
Denny Biasiolli
d6dec44be9 [FIX] Odoo 12.0-13.0: fixing wkhtmltopdf package url
using `buster` package instead of `stretch`
2020-10-12 16:21:06 +02:00
Christophe Monniez
d9e5b758fc [REF] Odoo 12.0-14.0: update to release 20201012 2020-10-12 14:13:23 +02:00
Christophe Monniez
0ffdd00409 [ADD] Odoo: 14.0 2020-10-02 14:28:06 +02:00
Christophe Monniez
52216118ac [REF] Odoo 12.0-13.0: bump to release 20201002 2020-10-02 14:27:06 +02:00
Christophe Monniez
61f9859983 [REM] Odoo 11.0: remove unmaintained version 2020-10-02 09:23:03 +02:00
Christophe Monniez
1bddcda4b2 [REF] Odoo 11.0-13.0: update to release 20200826 2020-08-26 08:11:51 +02:00
Christophe Monniez
b4c45baf1f [REF] Odoo 11.0-13.0: update to release 20200629 2020-06-29 10:10:05 +02:00
Christophe Monniez
f116a674ca [FIX] Odoo 11.0-13.0: remove postgres source list after usage
When installing postgresql-client, the Debian repo from Postgresql is added as a source list.
As a consequence, when installing the Odoo debian packages, the
package dependencies are also searched in the Postgresql repo.

In this case, it appears that python3-werkzeug version 0.16 was
installed from the Postgresql repo.

Closes #299
2020-04-17 16:15:25 +02:00
Christophe Monniez
22ddf056d5 [IMP] Odoo 11.0-13.0: avoid masking return value of mktemp 2020-04-17 15:34:56 +02:00
Christophe Monniez
91a9019df7 [IMP] Odoo 11.0-13.0: avoid to install unnecessary packages 2020-04-17 15:34:56 +02:00
Andris
3e06fdf97d [FIX] Odoo 11.0-13.0: set the default shell to bash
It appears that dash can be unpredictable.

Also, uses the `pipefail` as stated in the Dockerfile best practice [1].

[1] https://github.com/docker/docker.github.io/blob/master/develop/develop-images/dockerfile_best-practices.md#using-pipes
2020-04-17 15:34:55 +02:00
Andris
9323219289 [FIX] Odoo 11.0-13.0: install odoo deb in one pass
Before this commit, the deb package was installed in two steps.
The first step was to use dpkg and force the install, the second step
was to repair the broken install.
2020-04-17 15:34:55 +02:00
Christophe Monniez
d38f9ccc04 [REF] Odoo 11.0-13.0: update to release 20200417
Closes #298
2020-04-17 11:07:57 +02:00
Christophe Monniez
b4779b0e56 [IMP] Odoo 11.0-13.0: also exports port 8072
Although the `EXPOSE` instruction does not actually publish the ports,
it has an impact on inter docker communication.

With this commit, port 8072 is also exposed.

Closes #107
2020-03-31 15:39:25 +02:00
Christophe Monniez
6d92142da1 [IMP] Odoo 11.0-13.0: install python-slugify
The Odoo's fallback for the slugify_one method does only support latin
letters. This commit installs the python-slugify library from the Debian
packages.

Closes #199

Thanks to @lem8r for the report and PR.
2020-01-23 14:38:36 +01:00
Christophe Monniez
0c835c7485 [IMP] Odoo 11.0-13.0: remove a RUN layer
Small improvement to minimze the number of layers.
Thanks to @valerianpereira for the PR.

Closes #188
2020-01-22 15:57:16 +01:00
Christophe Monniez
6011cc7931 [FIX] Odoo 11.0-13.0: add xlrd library to allow xls import
Fixes #262
2020-01-21 16:21:24 +01:00
Christophe Monniez
740e5dc53d [FIX] Odoo 11.0-13.0: use an absolute path for psql source list
When creating an apt source list for Postgresql Debian package, the
redirection uses a relative path. It works because the default WORKDIR
but it's a fragile bad practice.

Thanks to @fractalf and @alorence for the bug report and investigation.

closes #287, closes #290
2020-01-21 10:33:48 +01:00
Christophe Monniez
b82980338d [REF] Odoo 11.0-13.0: update to release 20200121 2020-01-21 10:26:17 +01:00
Christophe Monniez
596a7cabc0 [REF] Odoo 11.0-13.0: update to release 20191106 2019-11-06 16:46:09 +01:00
Anang Aji Rahmawan
9c3a2dd128 [FIX] Odoo 11.0-13.0: get database config value 2019-11-06 16:24:15 +01:00
Christophe Monniez
ffe62bdd52 [FIX] Odoo 11.0-12.0: replace wait-for-it script
As the wait-for-it script is started before the parsing of the command
line, it is always started. It can be a problem if a user wants to start
some other binary than odoo (for example a shell).

Also, the wait-for-it script is only checking if a port is open on a
host and then waits 5 seconds before starting Odoo.

With this commit, the wait-for-it script is replaced by a more useful
custom python script that checks if the postgresql server is able to
handle a connection with the given parameters. Odoo then starts whenever
it's ready or fails after a 30 sec timeout.
2019-10-23 15:44:58 +02:00
Christophe Monniez
19c6725881 [REF] Odoo 11.0-13.0: update to release 20191022 2019-10-22 13:26:30 +02:00
rbuisson
14e51ae334 [IMP] 11.0-13.0: Wait for PostgreSQL before starting Odoo
In some situations, like when a docker compose file use a data volume
to persist postgresql databases, the Odoo server starts and tries to
connect to database server before the postgresql server is ready.

In such a case, the Odoo containers fails to start.

With this commit, the wait-for-it script is used to wait for the
database server service to be ready before starting Odoo.

This script is available as a Debian package.

Closes #258, closes #259
2019-10-16 13:16:21 +02:00
Christophe Monniez
f126d72f66 [FIX] 11.0-13.0: use apt-get to install wkhtmltopdf
Usage of apt-get should prevent installing wkhtmltopdf on wrong
architecture.
2019-10-12 12:44:02 +02:00
Christophe Monniez
c1fbc53720 [FIX] 11.0-13.0: use gpg batch mode
Without batch option, gpg may try to use /dev/tty.

See https://bugs.debian.org/913614
2019-10-12 12:44:02 +02:00
Christophe Monniez
9409487426 [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
2019-10-12 12:37:54 +02:00
Christophe Monniez
6ba07c93c3 [FIX] 11.0-13.0: remove deprecated label usage 2019-10-12 12:32:18 +02:00
Christophe Monniez
0660495954 [REF] Odoo 11.0-12.0: update to release 20191009 2019-10-12 12:32:18 +02:00
Christophe Monniez
6e7938ab6a [ADD] Odoo: 13.0
* Add Odoo version 13.0 release 20191009
2019-10-09 13:49:49 +02:00
Christophe Monniez
b32f2033d1 [REM] Odoo 10.0: remove deprecated version 2019-10-08 08:35:11 +02:00
Christophe Monniez
b5f088de13 [REF] Odoo 10.0-12.0: update to release 20190816 2019-08-16 14:14:44 +02:00
Christophe Monniez
c6b79809f0 [REF] Odoo 10.0-12.0: update to release 20190424 2019-04-24 17:01:17 +02:00
Christophe Monniez
d3e44ad1f3 [FIX] Odoo 10.0-12.0: use long ID's for gpg keys
Use long gpg ID's to avoid collisions.
2019-01-31 17:18:17 +01:00
Christophe Monniez
87f0174dca [FIX] Odoo 10.0-12.0: use a more secure way to download keys
At build time, curl is used to download gnupg keys without any
verification.

This does not meet the Docker hub requirements:
https://github.com/docker-library/official-images#security

With this commit, gpg is used to download the keys with the best method
specified in the requirements.
2019-01-30 15:43:24 +01:00
Christophe Monniez
4ab6185614 [REF] Odoo 10.0-12.0: update to release 20190128
the release timestamp and the verification sha1 are now using an ARG
instruction.

It means that they can be specified on the command line argument at the
build time.
2019-01-29 15:23:57 +01:00
Christophe Monniez
a1463daf59 [FIX] Odoo 11.0-12.0: add asian fonts and rtlcss
When printing a report, the asian fonts were missing.
Also, since Odoo 12.0, rtlcss is needed to support the right-to-left languages
in the Odoo UI.

With this commit, the noto-cjk fonts are added as well as the nodejs rtlcss tool.
2019-01-29 14:41:08 +01:00
Christophe Monniez
01f0a1e508 [FIX] Odoo 10.0-12.0: use latest postgresql-client
As the Odoo Docker images are based on Debian Jessie and Stretch, they
use the postgresql-client package from the respective Debian repo.

The backup feature of Odoo uses the postgresql-client. As a consequence,
if a database server newer than the client is used, the backup may fail.

For example, when using the Odoo Docker image 10.0 against a postgresql
server 10.0, the backup fails.

With this commit, the latest postgresql-client is used from the Postgres
repository. As they seem to be backward compatible, the Odoo backup will
succeed wathever the client/server combination.

fixes odoo/odoo#30599
2019-01-29 14:34:05 +01:00
Christophe Monniez
5ef3bee9dc [FIX] Odoo 10.0-12.0: make curl download quieter
When downloading wkhtmltopdf, curl shows a progress status unecessary
during the builds.
2019-01-29 14:03:05 +01:00
Christophe Monniez
5cc7eae335 [FIX] Odoo 10.0-12.0: remove deprecated MAINTAINER instruction
The MAINTAINER instruction is deprecated since Docker version 1.13.
With this commit, the LABEL instruction is used instead.
2019-01-29 13:37:17 +01:00
Christophe Monniez
d036067821 [REF] Odoo 10.0-12.0: update to release 20181126 2018-11-26 14:15:56 +01:00
Christophe Monniez
5935496f14 [FIX] Odoo 10.0-12.0: update wkhtmltopdf to recommended version
wkhtmltopdf 0.12.5 is now the recommended version.
This commiit uses the Debian packages that exist for Jessie and Stretch.

Fixes #220
2018-11-26 14:10:38 +01:00
Christophe Monniez
05c776bcb2 [FIX] Odoo 10.0-12.0: add missing packages
In Odoo, ldap, qrcode and vobject python modules are set as required in
odoo/setup.py. On the other hand, they are only recommendend in the
Debian package.

As a consequence, it was difficult to run some Odoo modules that
required one of them.

The Odoo Debian package was adapted in master where they were added as
dependencies in odoo/odoo@2ff49c5fcb .

With this commit, they are installed in the Docker images.

This is a part of the fix of odoo/odoo#27752.
2018-11-26 14:02:31 +01:00
16 changed files with 500 additions and 186 deletions

View File

@ -0,0 +1,49 @@
name: Build, Secure, and Push Docker Image on Release
on:
release:
types: [published, prereleased]
permissions:
id-token: write
contents: read
packages: write
env:
DOCKER_IMAGE_NAME: docker.io/openharbor/odoo
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Log in to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }}
- name: Determine Tag Type
id: tag_type
run: |
if [[ "${{ github.event.release.prerelease }}" == "true" ]]; then
echo "tag=dev" >> $GITHUB_ENV
else
echo "tag=latest" >> $GITHUB_ENV
fi
- name: Build, push, and generate SBOM and provenance
run: |
docker buildx build \
--provenance=true \
--sbom=true \
--push \
-t ${{ env.DOCKER_IMAGE_NAME }}:${{ github.event.release.tag_name }} \
-t ${{ env.DOCKER_IMAGE_NAME }}:${{ env.tag }} \
./18.0/

View File

@ -1,55 +0,0 @@
FROM debian:jessie
MAINTAINER Odoo S.A. <info@odoo.com>
# Install some deps, lessc and less-plugin-clean-css, and wkhtmltopdf
RUN set -x; \
apt-get update \
&& apt-get install -y --no-install-recommends \
ca-certificates \
curl \
node-less \
python-gevent \
python-pip \
python-renderpm \
python-support \
python-watchdog \
&& curl -o wkhtmltox.deb -SL http://nightly.odoo.com/extra/wkhtmltox-0.12.1.2_linux-jessie-amd64.deb \
&& echo '40e8b906de658a2221b15e4e8cd82565a47d7ee8 wkhtmltox.deb' | sha1sum -c - \
&& dpkg --force-depends -i wkhtmltox.deb \
&& apt-get -y install -f --no-install-recommends \
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false -o APT::AutoRemove::SuggestsImportant=false npm \
&& rm -rf /var/lib/apt/lists/* wkhtmltox.deb \
&& pip install psycogreen==1.0
# Install Odoo
ENV ODOO_VERSION 10.0
ENV ODOO_RELEASE 20181109
RUN set -x; \
curl -o odoo.deb -SL http://nightly.odoo.com/${ODOO_VERSION}/nightly/deb/odoo_${ODOO_VERSION}.${ODOO_RELEASE}_all.deb \
&& echo '8b24a5a3e36aed8986d3d6b19c8a255ee72cd658 odoo.deb' | sha1sum -c - \
&& dpkg --force-depends -i odoo.deb \
&& apt-get update \
&& apt-get -y install -f --no-install-recommends \
&& rm -rf /var/lib/apt/lists/* odoo.deb
# Copy entrypoint script and Odoo configuration file
COPY ./entrypoint.sh /
COPY ./odoo.conf /etc/odoo/
RUN chown odoo /etc/odoo/odoo.conf
# Mount /var/lib/odoo to allow restoring filestore and /mnt/extra-addons for users addons
RUN mkdir -p /mnt/extra-addons \
&& chown -R odoo /mnt/extra-addons
VOLUME ["/var/lib/odoo", "/mnt/extra-addons"]
# Expose Odoo services
EXPOSE 8069 8071
# Set the default config file
ENV ODOO_RC /etc/odoo/odoo.conf
# Set default user when running the container
USER odoo
ENTRYPOINT ["/entrypoint.sh"]
CMD ["odoo"]

View File

@ -1,59 +0,0 @@
FROM debian:stretch
MAINTAINER Odoo S.A. <info@odoo.com>
# Generate locale C.UTF-8 for postgres and general locale data
ENV LANG C.UTF-8
# Install some deps, lessc and less-plugin-clean-css, and wkhtmltopdf
RUN set -x; \
apt-get update \
&& apt-get install -y --no-install-recommends \
ca-certificates \
curl \
node-less \
python3-pip \
python3-setuptools \
python3-renderpm \
libssl1.0-dev \
xz-utils \
python3-watchdog \
&& curl -o wkhtmltox.tar.xz -SL https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz \
&& echo '3f923f425d345940089e44c1466f6408b9619562 wkhtmltox.tar.xz' | sha1sum -c - \
&& tar xvf wkhtmltox.tar.xz \
&& cp wkhtmltox/lib/* /usr/local/lib/ \
&& cp wkhtmltox/bin/* /usr/local/bin/ \
&& cp -r wkhtmltox/share/man/man1 /usr/local/share/man/
# Install Odoo
ENV ODOO_VERSION 11.0
ENV ODOO_RELEASE 20181109
RUN set -x; \
curl -o odoo.deb -SL http://nightly.odoo.com/${ODOO_VERSION}/nightly/deb/odoo_${ODOO_VERSION}.${ODOO_RELEASE}_all.deb \
&& echo '04823230d99d16dbaf157c55cfad632db4559060 odoo.deb' | sha1sum -c - \
&& dpkg --force-depends -i odoo.deb \
&& apt-get update \
&& apt-get -y install -f --no-install-recommends \
&& rm -rf /var/lib/apt/lists/* odoo.deb
# Copy entrypoint script and Odoo configuration file
RUN pip3 install num2words xlwt
COPY ./entrypoint.sh /
COPY ./odoo.conf /etc/odoo/
RUN chown odoo /etc/odoo/odoo.conf
# Mount /var/lib/odoo to allow restoring filestore and /mnt/extra-addons for users addons
RUN mkdir -p /mnt/extra-addons \
&& chown -R odoo /mnt/extra-addons
VOLUME ["/var/lib/odoo", "/mnt/extra-addons"]
# Expose Odoo services
EXPOSE 8069 8071
# Set the default config file
ENV ODOO_RC /etc/odoo/odoo.conf
# Set default user when running the container
USER odoo
ENTRYPOINT ["/entrypoint.sh"]
CMD ["odoo"]

View File

@ -1,59 +0,0 @@
FROM debian:stretch
MAINTAINER Odoo S.A. <info@odoo.com>
# Generate locale C.UTF-8 for postgres and general locale data
ENV LANG C.UTF-8
# Install some deps, lessc and less-plugin-clean-css, and wkhtmltopdf
RUN set -x; \
apt-get update \
&& apt-get install -y --no-install-recommends \
ca-certificates \
curl \
node-less \
python3-pip \
python3-setuptools \
python3-renderpm \
libssl1.0-dev \
xz-utils \
python3-watchdog \
&& curl -o wkhtmltox.tar.xz -SL https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz \
&& echo '3f923f425d345940089e44c1466f6408b9619562 wkhtmltox.tar.xz' | sha1sum -c - \
&& tar xvf wkhtmltox.tar.xz \
&& cp wkhtmltox/lib/* /usr/local/lib/ \
&& cp wkhtmltox/bin/* /usr/local/bin/ \
&& cp -r wkhtmltox/share/man/man1 /usr/local/share/man/
# Install Odoo
ENV ODOO_VERSION 12.0
ENV ODOO_RELEASE 20181109
RUN set -x; \
curl -o odoo.deb -SL http://nightly.odoo.com/${ODOO_VERSION}/nightly/deb/odoo_${ODOO_VERSION}.${ODOO_RELEASE}_all.deb \
&& echo 'fcaa0f72ecc8a4fa5636948a8966f7584eab1fac odoo.deb' | sha1sum -c - \
&& dpkg --force-depends -i odoo.deb \
&& apt-get update \
&& apt-get -y install -f --no-install-recommends \
&& rm -rf /var/lib/apt/lists/* odoo.deb
# Copy entrypoint script and Odoo configuration file
RUN pip3 install num2words xlwt
COPY ./entrypoint.sh /
COPY ./odoo.conf /etc/odoo/
RUN chown odoo /etc/odoo/odoo.conf
# Mount /var/lib/odoo to allow restoring filestore and /mnt/extra-addons for users addons
RUN mkdir -p /mnt/extra-addons \
&& chown -R odoo /mnt/extra-addons
VOLUME ["/var/lib/odoo", "/mnt/extra-addons"]
# Expose Odoo services
EXPOSE 8069 8071
# Set the default config file
ENV ODOO_RC /etc/odoo/odoo.conf
# Set default user when running the container
USER odoo
ENTRYPOINT ["/entrypoint.sh"]
CMD ["odoo"]

102
16.0/Dockerfile Normal file
View File

@ -0,0 +1,102 @@
FROM debian:bullseye-slim
MAINTAINER Odoo S.A. <info@odoo.com>
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 \
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 && \
if [ -z "${TARGETARCH}" ]; then \
TARGETARCH="$(dpkg --print-architecture)"; \
fi; \
WKHTMLTOPDF_ARCH=${TARGETARCH} && \
case ${TARGETARCH} in \
"amd64") WKHTMLTOPDF_ARCH=amd64 && WKHTMLTOPDF_SHA=9df8dd7b1e99782f1cfa19aca665969bbd9cc159 ;; \
"arm64") WKHTMLTOPDF_SHA=58c84db46b11ba0e14abb77a32324b1c257f1f22 ;; \
"ppc64le" | "ppc64el") WKHTMLTOPDF_ARCH=ppc64el && WKHTMLTOPDF_SHA=7ed8f6dcedf5345a3dd4eeb58dc89704d862f9cd ;; \
esac \
&& curl -o wkhtmltox.deb -sSL https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-3/wkhtmltox_0.12.6.1-3.bullseye_${WKHTMLTOPDF_ARCH}.deb \
&& echo ${WKHTMLTOPDF_SHA} wkhtmltox.deb | sha1sum -c - \
&& apt-get install -y --no-install-recommends ./wkhtmltox.deb \
&& rm -rf /var/lib/apt/lists/* wkhtmltox.deb
# install latest postgresql-client
RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ bullseye-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
ENV ODOO_VERSION 16.0
ARG ODOO_RELEASE=20241220
ARG ODOO_SHA=6312a02426f8b8c8b7578947cd8733e8f042de54
RUN curl -o odoo.deb -sSL http://nightly.odoo.com/${ODOO_VERSION}/nightly/deb/odoo_${ODOO_VERSION}.${ODOO_RELEASE}_all.deb \
&& echo "${ODOO_SHA} odoo.deb" | sha1sum -c - \
&& apt-get update \
&& apt-get -y install --no-install-recommends ./odoo.deb \
&& rm -rf /var/lib/apt/lists/* odoo.deb
# Copy entrypoint script and Odoo configuration file
COPY ./entrypoint.sh /
COPY ./odoo.conf /etc/odoo/
# Set permissions and Mount /var/lib/odoo to allow restoring filestore and /mnt/extra-addons for users addons
RUN chown odoo /etc/odoo/odoo.conf \
&& mkdir -p /mnt/extra-addons \
&& chown -R odoo /mnt/extra-addons
VOLUME ["/var/lib/odoo", "/mnt/extra-addons"]
# Expose Odoo services
EXPOSE 8069 8071 8072
# Set the default config file
ENV ODOO_RC /etc/odoo/odoo.conf
COPY wait-for-psql.py /usr/local/bin/wait-for-psql.py
# Set default user when running the container
USER odoo
ENTRYPOINT ["/entrypoint.sh"]
CMD ["odoo"]

View File

@ -2,6 +2,10 @@
set -e
if [ -v PASSWORD_FILE ]; then
PASSWORD="$(< $PASSWORD_FILE)"
fi
# set the postgres database host, port, user and password according to the environment
# and pass them as arguments to the odoo process if not present in the config file
: ${HOST:=${DB_PORT_5432_TCP_ADDR:='db'}}
@ -13,10 +17,11 @@ DB_ARGS=()
function check_config() {
param="$1"
value="$2"
if ! grep -q -E "^\s*\b${param}\b\s*=" "$ODOO_RC" ; then
DB_ARGS+=("--${param}")
DB_ARGS+=("${value}")
fi;
if grep -q -E "^\s*\b${param}\b\s*=" "$ODOO_RC" ; then
value=$(grep -E "^\s*\b${param}\b\s*=" "$ODOO_RC" |cut -d " " -f3|sed 's/["\n\r]//g')
fi;
DB_ARGS+=("--${param}")
DB_ARGS+=("${value}")
}
check_config "db_host" "$HOST"
check_config "db_port" "$PORT"
@ -29,10 +34,12 @@ case "$1" in
if [[ "$1" == "scaffold" ]] ; then
exec odoo "$@"
else
wait-for-psql.py ${DB_ARGS[@]} --timeout=30
exec odoo "$@" "${DB_ARGS[@]}"
fi
;;
-*)
wait-for-psql.py ${DB_ARGS[@]} --timeout=30
exec odoo "$@" "${DB_ARGS[@]}"
;;
*)

32
16.0/wait-for-psql.py Executable file
View File

@ -0,0 +1,32 @@
#!/usr/bin/env python3
import argparse
import psycopg2
import sys
import time
if __name__ == '__main__':
arg_parser = argparse.ArgumentParser()
arg_parser.add_argument('--db_host', required=True)
arg_parser.add_argument('--db_port', required=True)
arg_parser.add_argument('--db_user', required=True)
arg_parser.add_argument('--db_password', required=True)
arg_parser.add_argument('--timeout', type=int, default=5)
args = arg_parser.parse_args()
start_time = time.time()
while (time.time() - start_time) < args.timeout:
try:
conn = psycopg2.connect(user=args.db_user, host=args.db_host, port=args.db_port, password=args.db_password, dbname='postgres')
error = ''
break
except psycopg2.OperationalError as e:
error = e
else:
conn.close()
time.sleep(1)
if error:
print("Database connection failure: %s" % error, file=sys.stderr)
sys.exit(1)

104
17.0/Dockerfile Normal file
View File

@ -0,0 +1,104 @@
FROM ubuntu:jammy
MAINTAINER Odoo S.A. <info@odoo.com>
SHELL ["/bin/bash", "-xo", "pipefail", "-c"]
# Generate locale C.UTF-8 for postgres and general locale data
ENV LANG en_US.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 && \
DEBIAN_FRONTEND=noninteractive \
apt-get install -y --no-install-recommends \
ca-certificates \
curl \
dirmngr \
fonts-noto-cjk \
gnupg \
libssl-dev \
node-less \
npm \
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 && \
if [ -z "${TARGETARCH}" ]; then \
TARGETARCH="$(dpkg --print-architecture)"; \
fi; \
WKHTMLTOPDF_ARCH=${TARGETARCH} && \
case ${TARGETARCH} in \
"amd64") WKHTMLTOPDF_ARCH=amd64 && WKHTMLTOPDF_SHA=967390a759707337b46d1c02452e2bb6b2dc6d59 ;; \
"arm64") WKHTMLTOPDF_SHA=90f6e69896d51ef77339d3f3a20f8582bdf496cc ;; \
"ppc64le" | "ppc64el") WKHTMLTOPDF_ARCH=ppc64el && WKHTMLTOPDF_SHA=5312d7d34a25b321282929df82e3574319aed25c ;; \
esac \
&& curl -o wkhtmltox.deb -sSL https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-3/wkhtmltox_0.12.6.1-3.jammy_${WKHTMLTOPDF_ARCH}.deb \
&& echo ${WKHTMLTOPDF_SHA} wkhtmltox.deb | sha1sum -c - \
&& apt-get install -y --no-install-recommends ./wkhtmltox.deb \
&& rm -rf /var/lib/apt/lists/* wkhtmltox.deb
# install latest postgresql-client
RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ jammy-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
ENV ODOO_VERSION 17.0
ARG ODOO_RELEASE=20241220
ARG ODOO_SHA=db83c23c2c4a4b5c7881cde0c4d8868c7b9adf10
RUN curl -o odoo.deb -sSL http://nightly.odoo.com/${ODOO_VERSION}/nightly/deb/odoo_${ODOO_VERSION}.${ODOO_RELEASE}_all.deb \
&& echo "${ODOO_SHA} odoo.deb" | sha1sum -c - \
&& apt-get update \
&& apt-get -y install --no-install-recommends ./odoo.deb \
&& rm -rf /var/lib/apt/lists/* odoo.deb
# Copy entrypoint script and Odoo configuration file
COPY ./entrypoint.sh /
COPY ./odoo.conf /etc/odoo/
# Set permissions and Mount /var/lib/odoo to allow restoring filestore and /mnt/extra-addons for users addons
RUN chown odoo /etc/odoo/odoo.conf \
&& mkdir -p /mnt/extra-addons \
&& chown -R odoo /mnt/extra-addons
VOLUME ["/var/lib/odoo", "/mnt/extra-addons"]
# Expose Odoo services
EXPOSE 8069 8071 8072
# Set the default config file
ENV ODOO_RC /etc/odoo/odoo.conf
COPY wait-for-psql.py /usr/local/bin/wait-for-psql.py
# Set default user when running the container
USER odoo
ENTRYPOINT ["/entrypoint.sh"]
CMD ["odoo"]

View File

@ -2,6 +2,10 @@
set -e
if [ -v PASSWORD_FILE ]; then
PASSWORD="$(< $PASSWORD_FILE)"
fi
# set the postgres database host, port, user and password according to the environment
# and pass them as arguments to the odoo process if not present in the config file
: ${HOST:=${DB_PORT_5432_TCP_ADDR:='db'}}
@ -13,10 +17,11 @@ DB_ARGS=()
function check_config() {
param="$1"
value="$2"
if ! grep -q -E "^\s*\b${param}\b\s*=" "$ODOO_RC" ; then
DB_ARGS+=("--${param}")
DB_ARGS+=("${value}")
fi;
if grep -q -E "^\s*\b${param}\b\s*=" "$ODOO_RC" ; then
value=$(grep -E "^\s*\b${param}\b\s*=" "$ODOO_RC" |cut -d " " -f3|sed 's/["\n\r]//g')
fi;
DB_ARGS+=("--${param}")
DB_ARGS+=("${value}")
}
check_config "db_host" "$HOST"
check_config "db_port" "$PORT"
@ -29,10 +34,12 @@ case "$1" in
if [[ "$1" == "scaffold" ]] ; then
exec odoo "$@"
else
wait-for-psql.py ${DB_ARGS[@]} --timeout=30
exec odoo "$@" "${DB_ARGS[@]}"
fi
;;
-*)
wait-for-psql.py ${DB_ARGS[@]} --timeout=30
exec odoo "$@" "${DB_ARGS[@]}"
;;
*)

32
17.0/wait-for-psql.py Executable file
View File

@ -0,0 +1,32 @@
#!/usr/bin/env python3
import argparse
import psycopg2
import sys
import time
if __name__ == '__main__':
arg_parser = argparse.ArgumentParser()
arg_parser.add_argument('--db_host', required=True)
arg_parser.add_argument('--db_port', required=True)
arg_parser.add_argument('--db_user', required=True)
arg_parser.add_argument('--db_password', required=True)
arg_parser.add_argument('--timeout', type=int, default=5)
args = arg_parser.parse_args()
start_time = time.time()
while (time.time() - start_time) < args.timeout:
try:
conn = psycopg2.connect(user=args.db_user, host=args.db_host, port=args.db_port, password=args.db_password, dbname='postgres')
error = ''
break
except psycopg2.OperationalError as e:
error = e
else:
conn.close()
time.sleep(1)
if error:
print("Database connection failure: %s" % error, file=sys.stderr)
sys.exit(1)

104
18.0/Dockerfile Normal file
View File

@ -0,0 +1,104 @@
FROM ubuntu:noble
MAINTAINER Odoo S.A. <info@odoo.com>
SHELL ["/bin/bash", "-xo", "pipefail", "-c"]
# Generate locale C.UTF-8 for postgres and general locale data
ENV LANG en_US.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 && \
DEBIAN_FRONTEND=noninteractive \
apt-get install -y --no-install-recommends \
ca-certificates \
curl \
dirmngr \
fonts-noto-cjk \
gnupg \
libssl-dev \
node-less \
npm \
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 && \
if [ -z "${TARGETARCH}" ]; then \
TARGETARCH="$(dpkg --print-architecture)"; \
fi; \
WKHTMLTOPDF_ARCH=${TARGETARCH} && \
case ${TARGETARCH} in \
"amd64") WKHTMLTOPDF_ARCH=amd64 && WKHTMLTOPDF_SHA=967390a759707337b46d1c02452e2bb6b2dc6d59 ;; \
"arm64") WKHTMLTOPDF_SHA=90f6e69896d51ef77339d3f3a20f8582bdf496cc ;; \
"ppc64le" | "ppc64el") WKHTMLTOPDF_ARCH=ppc64el && WKHTMLTOPDF_SHA=5312d7d34a25b321282929df82e3574319aed25c ;; \
esac \
&& curl -o wkhtmltox.deb -sSL https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-3/wkhtmltox_0.12.6.1-3.jammy_${WKHTMLTOPDF_ARCH}.deb \
&& echo ${WKHTMLTOPDF_SHA} wkhtmltox.deb | sha1sum -c - \
&& apt-get install -y --no-install-recommends ./wkhtmltox.deb \
&& rm -rf /var/lib/apt/lists/* wkhtmltox.deb
# install latest postgresql-client
RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ noble-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
ENV ODOO_VERSION 18.0
ARG ODOO_RELEASE=20241220
ARG ODOO_SHA=449cd495882dc0f35bc11632414fcdc585ed350e
RUN curl -o odoo.deb -sSL http://nightly.odoo.com/${ODOO_VERSION}/nightly/deb/odoo_${ODOO_VERSION}.${ODOO_RELEASE}_all.deb \
&& echo "${ODOO_SHA} odoo.deb" | sha1sum -c - \
&& apt-get update \
&& apt-get -y install --no-install-recommends ./odoo.deb \
&& rm -rf /var/lib/apt/lists/* odoo.deb
# Copy entrypoint script and Odoo configuration file
COPY ./entrypoint.sh /
COPY ./odoo.conf /etc/odoo/
# Set permissions and Mount /var/lib/odoo to allow restoring filestore and /mnt/extra-addons for users addons
RUN chown odoo /etc/odoo/odoo.conf \
&& mkdir -p /mnt/extra-addons \
&& chown -R odoo /mnt/extra-addons
VOLUME ["/var/lib/odoo", "/mnt/extra-addons"]
# Expose Odoo services
EXPOSE 8069 8071 8072
# Set the default config file
ENV ODOO_RC /etc/odoo/odoo.conf
COPY wait-for-psql.py /usr/local/bin/wait-for-psql.py
# Set default user when running the container
USER odoo
ENTRYPOINT ["/entrypoint.sh"]
CMD ["odoo"]

View File

@ -2,26 +2,41 @@
set -e
if [ -v PASSWORD_FILE ]; then
PASSWORD="$(< $PASSWORD_FILE)"
fi
# set the postgres database host, port, user and password according to the environment
# and pass them as arguments to the odoo process if not present in the config file
: ${HOST:=${DB_PORT_5432_TCP_ADDR:='db'}}
: ${PORT:=${DB_PORT_5432_TCP_PORT:=5432}}
: ${USER:=${DB_ENV_POSTGRES_USER:=${POSTGRES_USER:='odoo'}}}
: ${PASSWORD:=${DB_ENV_POSTGRES_PASSWORD:=${POSTGRES_PASSWORD:='odoo'}}}
: ${DB_NAME:=${DB_ENV_POSTGRES_DB_NAME:=${POSTGRES_DB_NAME:='odoo'}}}
DB_ARGS=()
PY_DB_ARGS=()
function check_config() {
param="$1"
value="$2"
if ! grep -q -E "^\s*\b${param}\b\s*=" "$ODOO_RC" ; then
DB_ARGS+=("--${param}")
DB_ARGS+=("${value}")
fi;
if grep -q -E "^\s*\b${param}\b\s*=" "$ODOO_RC" ; then
value=$(grep -E "^\s*\b${param}\b\s*=" "$ODOO_RC" |cut -d " " -f3|sed 's/["\n\r]//g')
fi;
if [ "${param}" != "db_name" ]; then
DB_ARGS+=("--${param}")
DB_ARGS+=("${value}")
fi;
PY_DB_ARGS+=("--${param}")
PY_DB_ARGS+=("${value}")
}
check_config "db_host" "$HOST"
check_config "db_port" "$PORT"
check_config "db_user" "$USER"
check_config "db_password" "$PASSWORD"
check_config "db_name" "$DB_NAME"
case "$1" in
-- | odoo)
@ -29,10 +44,12 @@ case "$1" in
if [[ "$1" == "scaffold" ]] ; then
exec odoo "$@"
else
wait-for-psql.py ${PY_DB_ARGS[@]} --timeout=30
exec odoo "$@" "${DB_ARGS[@]}"
fi
;;
-*)
wait-for-psql.py ${PY_DB_ARGS[@]} --timeout=30
exec odoo "$@" "${DB_ARGS[@]}"
;;
*)

View File

@ -1,5 +1,5 @@
[options]
addons_path = /mnt/extra-addons,/usr/lib/python2.7/dist-packages/odoo/addons
addons_path = /mnt/extra-addons
data_dir = /var/lib/odoo
; admin_passwd = admin
; csv_internal_sep = ,

33
18.0/wait-for-psql.py Executable file
View File

@ -0,0 +1,33 @@
#!/usr/bin/env python3
import argparse
import psycopg2
import sys
import time
if __name__ == '__main__':
arg_parser = argparse.ArgumentParser()
arg_parser.add_argument('--db_host', required=True)
arg_parser.add_argument('--db_port', required=True)
arg_parser.add_argument('--db_name', required=True)
arg_parser.add_argument('--db_user', required=True)
arg_parser.add_argument('--db_password', required=True)
arg_parser.add_argument('--timeout', type=int, default=5)
args = arg_parser.parse_args()
start_time = time.time()
while (time.time() - start_time) < args.timeout:
try:
conn = psycopg2.connect(user=args.db_user, host=args.db_host, port=args.db_port, password=args.db_password, dbname=args.db_name)
error = ''
break
except psycopg2.OperationalError as e:
error = e
else:
conn.close()
time.sleep(1)
if error:
print("Database connection failure: %s" % error, file=sys.stderr)
sys.exit(1)