87f0174dca
At build time, curl is used to download gnupg keys without any verification. This does not meet the Docker hub requirements: https://github.com/docker-library/official-images#security With this commit, gpg is used to download the keys with the best method specified in the requirements.
71 lines
2.6 KiB
Docker
71 lines
2.6 KiB
Docker
FROM debian:jessie
|
|
LABEL maintainer="Odoo S.A. <info@odoo.com>"
|
|
|
|
# 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 \
|
|
dirmngr \
|
|
node-less \
|
|
python-gevent \
|
|
python-ldap \
|
|
python-pip \
|
|
python-qrcode \
|
|
python-renderpm \
|
|
python-support \
|
|
python-vobject \
|
|
python-watchdog \
|
|
&& curl -o wkhtmltox.deb -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.jessie_amd64.deb \
|
|
&& echo '4d104ff338dc2d2083457b3b1e9baab8ddf14202 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 \
|
|
&& pip install psycogreen==1.0
|
|
|
|
# install latest postgresql-client
|
|
RUN set -x; \
|
|
echo 'deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main' > etc/apt/sources.list.d/pgdg.list \
|
|
&& export GNUPGHOME="$(mktemp -d)" \
|
|
&& gpg --batch --keyserver keyserver.ubuntu.com --recv-keys ACCC4CF8 \
|
|
&& gpg --armor --export ACCC4CF8 | apt-key add - \
|
|
&& rm -rf "$GNUPGHOME" \
|
|
&& apt-get update \
|
|
&& apt-get install -y postgresql-client
|
|
|
|
# Install Odoo
|
|
ENV ODOO_VERSION 10.0
|
|
ARG ODOO_RELEASE=20190128
|
|
ARG ODOO_SHA=673bb5e45c006c9a822a0ca1a7d19989c03151ad
|
|
RUN set -x; \
|
|
curl -o odoo.deb -sSL http://nightly.odoo.com/${ODOO_VERSION}/nightly/deb/odoo_${ODOO_VERSION}.${ODOO_RELEASE}_all.deb \
|
|
&& echo "${ODOO_SHA} 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 ./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"]
|