2016-12-30 17:47:51 -05:00
|
|
|
FROM steenzout/odoo:${ODOO_VERSION}-base
|
|
|
|
MAINTAINER Pedro Salgado "steenzout@ymail.com"
|
2014-12-10 06:20:15 -05:00
|
|
|
|
2016-12-30 17:47:51 -05:00
|
|
|
ENV ODOO_RELEASE ${ODOO_RELEASE}
|
|
|
|
ENV ODOO_SHA1SUM ${ODOO_SHA1SUM}
|
2016-10-25 09:51:39 -04:00
|
|
|
|
2016-12-30 17:47:51 -05:00
|
|
|
# Set the default config file
|
|
|
|
ENV OPENERP_SERVER /etc/odoo/openerp-server.conf
|
2014-12-10 06:20:15 -05:00
|
|
|
|
|
|
|
# Install Odoo
|
2015-03-08 00:41:31 -05:00
|
|
|
RUN set -x; \
|
|
|
|
curl -o odoo.deb -SL http://nightly.odoo.com/${ODOO_VERSION}/nightly/deb/odoo_${ODOO_VERSION}.${ODOO_RELEASE}_all.deb \
|
2016-12-30 17:47:51 -05:00
|
|
|
&& echo '${ODOO_SHA1SUM} odoo.deb' | sha1sum -c - \
|
2014-12-29 04:36:27 -05:00
|
|
|
&& dpkg --force-depends -i odoo.deb \
|
2014-12-31 08:33:55 -05:00
|
|
|
&& apt-get update \
|
2014-12-11 05:26:49 -05:00
|
|
|
&& apt-get -y install -f --no-install-recommends \
|
2014-12-31 08:33:55 -05:00
|
|
|
&& rm -rf /var/lib/apt/lists/* odoo.deb
|
2014-12-10 06:20:15 -05:00
|
|
|
|
2015-03-17 13:01:30 -04:00
|
|
|
# Copy entrypoint script and Odoo configuration file
|
2016-12-30 18:52:17 -05:00
|
|
|
COPY "./entrypoint.sh" /
|
|
|
|
COPY "./openerp-server.conf" /etc/odoo/
|
2015-03-02 09:19:43 -05:00
|
|
|
RUN chown odoo /etc/odoo/openerp-server.conf
|
2014-12-10 06:20:15 -05:00
|
|
|
|
2015-02-27 12:38:06 -05:00
|
|
|
# Mount /var/lib/odoo to allow restoring filestore and /mnt/extra-addons for users addons
|
2015-10-08 04:59:38 -04:00
|
|
|
RUN mkdir -p /mnt/extra-addons \
|
|
|
|
&& chown -R odoo /mnt/extra-addons
|
2015-02-27 12:38:06 -05:00
|
|
|
VOLUME ["/var/lib/odoo", "/mnt/extra-addons"]
|
2014-12-15 05:50:47 -05:00
|
|
|
|
2015-02-27 10:18:03 -05:00
|
|
|
# Expose Odoo services
|
|
|
|
EXPOSE 8069 8071
|
|
|
|
|
2015-03-02 09:19:43 -05:00
|
|
|
# Set default user when running the container
|
|
|
|
USER odoo
|
|
|
|
|
2015-03-17 13:01:30 -04:00
|
|
|
ENTRYPOINT ["/entrypoint.sh"]
|
2015-03-17 13:04:55 -04:00
|
|
|
CMD ["openerp-server"]
|