-
Notifications
You must be signed in to change notification settings - Fork 8
/
Dockerfile
113 lines (103 loc) · 6.35 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
102
103
104
105
106
107
108
109
110
111
112
113
# DOCKER image to run odoo 17 with Odoo Community Backports and OCA addons
# WARNING: No work done yet for 17, this is a dummy release to keep track of
# it and move onto 17. Do not use.
FROM rubencabrera/odoo-base-image:17.0.0
MAINTAINER Rubén Cabrera Martínez <[email protected]>
EXPOSE 8069 8071 8072
ENV LANG C.UTF-8
RUN mkdir /opt/odoo; \
mkdir /var/log/odoo; \
mkdir /var/lib/odoo; \
mkdir /opt/repos; \
mkdir -p /opt/repos/oca; \
mkdir -p /opt/repos/other
RUN useradd --home /opt/odoo --shell /bin/bash odoo
RUN chown -R odoo:odoo /opt/odoo; chown -R odoo:odoo /var/lib/odoo; \
chown -R odoo:odoo /var/log/odoo; chown -R odoo:odoo /opt/repos
# Con lo siguiente, cambiamos al usuario odoo y el path donde ejecuta los
# comandos que se indiquen después.
USER odoo
WORKDIR /opt/odoo
RUN git clone --branch 17.0 --depth 1 https://github.com/oca/ocb.git /opt/odoo
# Odoo Community Association repositories
WORKDIR /opt/repos/oca
RUN git clone --branch 17.0 --depth 1 https://github.com/oca/account-analytic.git; \
git clone --branch 17.0 --depth 1 https://github.com/oca/account-budgeting.git; \
git clone --branch 17.0 --depth 1 https://github.com/oca/account-closing.git; \
git clone --branch 17.0 --depth 1 https://github.com/oca/account-consolidation.git; \
git clone --branch 17.0 --depth 1 https://github.com/oca/account-invoice-reporting.git; \
git clone --branch 17.0 --depth 1 https://github.com/oca/account-invoicing.git; \
git clone --branch 17.0 --depth 1 https://github.com/oca/account-financial-reporting.git; \
git clone --branch 17.0 --depth 1 https://github.com/oca/account-financial-tools.git; \
git clone --branch 17.0 --depth 1 https://github.com/oca/account-fiscal-rule.git; \
git clone --branch 17.0 --depth 1 https://github.com/oca/account-payment.git; \
git clone --branch 17.0 --depth 1 https://github.com/oca/bank-payment.git; \
git clone --branch 17.0 --depth 1 https://github.com/oca/bank-statement-import.git; \
git clone --branch 17.0 --depth 1 https://github.com/oca/bank-statement-reconcile.git; \
git clone --branch 17.0 --depth 1 https://github.com/oca/commission.git; \
git clone --branch 17.0 --depth 1 https://github.com/oca/community-data-files.git; \
git clone --branch 17.0 --depth 1 https://github.com/oca/connector-telephony.git; \
git clone --branch 17.0 --depth 1 https://github.com/oca/contract.git; \
git clone --branch 17.0 --depth 1 https://github.com/oca/crm.git; \
git clone --branch 17.0 --depth 1 https://github.com/oca/data-protection.git; \
git clone --branch 17.0 --depth 1 https://github.com/oca/e-commerce.git; \
git clone --branch 17.0 --depth 1 https://github.com/oca/event.git; \
git clone --branch 17.0 --depth 1 https://github.com/oca/hr.git; \
git clone --branch 17.0 --depth 1 https://github.com/oca/hr-timesheet.git; \
git clone --branch 17.0 --depth 1 https://github.com/oca/intrastat.git; \
git clone --branch 17.0 --depth 1 https://github.com/oca/knowledge.git; \
git clone --branch 17.0 --depth 1 https://github.com/oca/l10n-spain.git; \
git clone --branch 17.0 --depth 1 https://github.com/oca/management-system.git; \
git clone --branch 17.0 --depth 1 https://github.com/oca/manufacture.git; \
git clone --branch 17.0 --depth 1 https://github.com/oca/manufacture-reporting.git; \
git clone --branch 17.0 --depth 1 https://github.com/oca/margin-analysis.git; \
git clone --branch 17.0 --depth 1 https://github.com/oca/operating-unit.git; \
git clone --branch 17.0 --depth 1 https://github.com/oca/partner-contact.git; \
git clone --branch 17.0 --depth 1 https://github.com/oca/pos.git; \
git clone --branch 17.0 --depth 1 https://github.com/oca/product-attribute.git; \
git clone --branch 17.0 --depth 1 https://github.com/oca/product-variant.git; \
git clone --branch 17.0 --depth 1 https://github.com/oca/project.git; \
git clone --branch 17.0 --depth 1 https://github.com/oca/project-reporting.git; \
git clone --branch 17.0 --depth 1 https://github.com/oca/purchase-reporting.git; \
git clone --branch 17.0 --depth 1 https://github.com/oca/purchase-workflow.git; \
git clone --branch 17.0 --depth 1 https://github.com/oca/reporting-engine.git; \
git clone --branch 17.0 --depth 1 https://github.com/oca/rma.git; \
git clone --branch 17.0 --depth 1 https://github.com/oca/sale-financial.git; \
git clone --branch 17.0 --depth 1 https://github.com/oca/sale-reporting.git; \
git clone --branch 17.0 --depth 1 https://github.com/oca/sale-workflow.git; \
git clone --branch 17.0 --depth 1 https://github.com/oca/server-tools.git; \
git clone --branch 17.0 --depth 1 https://github.com/oca/server-ux.git; \
git clone --branch 17.0 --depth 1 https://github.com/oca/social.git; \
git clone --branch 17.0 --depth 1 https://github.com/oca/stock-logistics-barcode.git; \
git clone --branch 17.0 --depth 1 https://github.com/oca/stock-logistics-tracking.git; \
git clone --branch 17.0 --depth 1 https://github.com/oca/stock-logistics-transport.git; \
git clone --branch 17.0 --depth 1 https://github.com/oca/stock-logistics-warehouse.git; \
git clone --branch 17.0 --depth 1 https://github.com/oca/stock-logistics-workflow.git; \
git clone --branch 17.0 --depth 1 https://github.com/oca/web.git; \
git clone --branch 17.0 --depth 1 https://github.com/oca/website.git; \
git clone --branch 17.0 --depth 1 https://github.com/oca/website-cms.git;
WORKDIR /opt/repos/other
RUN git clone --branch 17 --depth 1 https://github.com/rubencabrera/odoo-addons.git rubencabrera-odoo-addons;
# Configuración
WORKDIR /opt
USER root
RUN mkdir /opt/config
COPY ./odoo-server.conf /opt/config/odoo-server.conf
ENV OPENERP_SERVER /opt/config/odoo-server.conf
RUN chown -R odoo:odoo /opt/config
RUN sed -i '/^#.*Storage/s/^#//' /etc/systemd/journald.conf
#RUN mkdir -p /var/lib/odoo \
#&& chown -R odoo /var/lib/odoo
#VOLUME ["/var/lib/odoo"]
# Mount /var/lib/odoo to allow restoring filestore and /mnt/extra-addons
# for users addons
RUN mkdir -p /mnt/extra-addons \
&& chown -R odoo:odoo /mnt/extra-addons \
&& chown -R odoo:odoo /var/lib/odoo
VOLUME ["/var/lib/odoo", "/mnt/extra-addons"]
COPY ./entrypoint.sh /opt/entrypoint.sh
RUN chown -R odoo:odoo /opt/entrypoint.sh
RUN ["chmod", "+x", "/opt/entrypoint.sh"]
USER odoo
ENTRYPOINT ["/opt/entrypoint.sh"]
CMD ["/opt/odoo/odoo-bin"]