-
Notifications
You must be signed in to change notification settings - Fork 9
/
Dockerfile
58 lines (50 loc) · 2.18 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
FROM debian:jessie
MAINTAINER Odoo S.A. <[email protected]>, Parthiv Patel <[email protected]>
# 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 \
node-clean-css \
python-pyinotify \
python-renderpm \
python-support \
unzip \
git \
&& 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
# Install Odoo
ENV ODOO_VERSION 9.0
ENV ODOO_RELEASE 20160726
RUN set -x; \
curl -o odoo.deb -SL http://nightly.odoo.com/${ODOO_VERSION}/nightly/deb/odoo_${ODOO_VERSION}c.${ODOO_RELEASE}_all.deb \
&& echo 'cbd0cbaed27da28eaae1c6460f36d398c8acbf77 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 ./openerp-server.conf /etc/odoo/
RUN chown odoo /etc/odoo/openerp-server.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 \
&& cd /mnt/extra-addons \
&& curl -o openeducat.zip -SL https://github.com/openeducat/openeducat_erp/archive/9.0.zip \
&& unzip /mnt/extra-addons/openeducat.zip
VOLUME ["/var/lib/odoo", "/mnt/extra-addons"]
# Expose Odoo services
EXPOSE 8069 8071
# Set the default config file
ENV OPENERP_SERVER /etc/odoo/openerp-server.conf
# Set default user when running the container
USER odoo
ENTRYPOINT ["/entrypoint.sh"]
CMD ["openerp-server"]