2017-10-13 10:18:10 -04:00
|
|
|
FROM debian:stretch
|
2019-01-29 07:37:17 -05:00
|
|
|
LABEL maintainer="Odoo S.A. <info@odoo.com>"
|
2017-10-13 10:18:10 -04:00
|
|
|
|
2017-10-17 08:23:41 -04:00
|
|
|
# Generate locale C.UTF-8 for postgres and general locale data
|
|
|
|
ENV LANG C.UTF-8
|
|
|
|
|
2017-10-13 10:18:10 -04:00
|
|
|
# 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 \
|
2019-01-29 08:41:08 -05:00
|
|
|
fonts-noto-cjk \
|
2019-01-29 08:34:05 -05:00
|
|
|
gnupg \
|
2018-11-26 07:38:47 -05:00
|
|
|
libssl1.0-dev \
|
2017-10-13 10:18:10 -04:00
|
|
|
node-less \
|
|
|
|
python3-pip \
|
2018-11-26 07:38:47 -05:00
|
|
|
python3-pyldap \
|
|
|
|
python3-qrcode \
|
2017-10-13 10:18:10 -04:00
|
|
|
python3-renderpm \
|
2018-11-26 07:38:47 -05:00
|
|
|
python3-setuptools \
|
|
|
|
python3-vobject \
|
2018-07-09 09:49:50 -04:00
|
|
|
python3-watchdog \
|
2018-11-26 07:38:47 -05:00
|
|
|
xz-utils \
|
2019-01-29 08:03:05 -05:00
|
|
|
&& curl -o wkhtmltox.deb -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.stretch_amd64.deb \
|
2018-11-26 08:10:38 -05:00
|
|
|
&& echo '7e35a63f9db14f93ec7feeb0fce76b30c08f2057 wkhtmltox.deb' | sha1sum -c - \
|
|
|
|
&& dpkg --force-depends -i wkhtmltox.deb\
|
|
|
|
&& apt-get -y install -f --no-install-recommends \
|
|
|
|
&& rm -rf /var/lib/apt/lists/* wkhtmltox.deb
|
2017-10-13 10:18:10 -04:00
|
|
|
|
2019-01-29 08:34:05 -05:00
|
|
|
# install latest postgresql-client
|
|
|
|
RUN set -x; \
|
|
|
|
echo 'deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main' > etc/apt/sources.list.d/pgdg.list \
|
|
|
|
&& curl -sSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - \
|
|
|
|
&& apt-get update \
|
|
|
|
&& apt-get install -y postgresql-client
|
|
|
|
|
2017-10-13 10:18:10 -04:00
|
|
|
# Install Odoo
|
|
|
|
ENV ODOO_VERSION 11.0
|
2018-11-26 08:15:56 -05:00
|
|
|
ENV ODOO_RELEASE 20181126
|
2017-10-13 10:18:10 -04:00
|
|
|
RUN set -x; \
|
|
|
|
curl -o odoo.deb -SL http://nightly.odoo.com/${ODOO_VERSION}/nightly/deb/odoo_${ODOO_VERSION}.${ODOO_RELEASE}_all.deb \
|
2018-11-26 08:15:56 -05:00
|
|
|
&& echo '57e270cd958ca97b3920d7187c8967e1458d975c odoo.deb' | sha1sum -c - \
|
2017-10-13 10:18:10 -04:00
|
|
|
&& 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
|
2018-01-22 05:39:40 -05:00
|
|
|
RUN pip3 install num2words xlwt
|
2017-10-13 10:18:10 -04:00
|
|
|
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"]
|