-
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 <dev@rubencabrera.es>
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"]