Merge d069d03dcf
into f13ffb4c91
This commit is contained in:
commit
e58febcbdb
@ -1,6 +1,15 @@
|
|||||||
FROM debian:jessie
|
FROM debian:jessie
|
||||||
MAINTAINER Odoo S.A. <info@odoo.com>
|
MAINTAINER Odoo S.A. <info@odoo.com>
|
||||||
|
|
||||||
|
# grab gosu for easy step-down from root
|
||||||
|
RUN gpg --keyserver pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4
|
||||||
|
RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/* \
|
||||||
|
&& curl -o /usr/local/bin/gosu -SL "https://github.com/tianon/gosu/releases/download/1.2/gosu-$(dpkg --print-architecture)" \
|
||||||
|
&& curl -o /usr/local/bin/gosu.asc -SL "https://github.com/tianon/gosu/releases/download/1.2/gosu-$(dpkg --print-architecture).asc" \
|
||||||
|
&& gpg --verify /usr/local/bin/gosu.asc \
|
||||||
|
&& rm /usr/local/bin/gosu.asc \
|
||||||
|
&& chmod +x /usr/local/bin/gosu
|
||||||
|
|
||||||
# Install some deps, lessc and less-plugin-clean-css, and wkhtmltopdf
|
# Install some deps, lessc and less-plugin-clean-css, and wkhtmltopdf
|
||||||
RUN set -x; \
|
RUN set -x; \
|
||||||
apt-get update \
|
apt-get update \
|
||||||
@ -10,8 +19,14 @@ RUN set -x; \
|
|||||||
node-less \
|
node-less \
|
||||||
node-clean-css \
|
node-clean-css \
|
||||||
python-pyinotify \
|
python-pyinotify \
|
||||||
|
fonts-dejavu \
|
||||||
|
fonts-dejavu-core \
|
||||||
|
fonts-dejavu-extra \
|
||||||
|
unzip \
|
||||||
|
locales-all \
|
||||||
python-renderpm \
|
python-renderpm \
|
||||||
python-support \
|
python-support \
|
||||||
|
locales \
|
||||||
&& curl -o wkhtmltox.deb -SL http://nightly.odoo.com/extra/wkhtmltox-0.12.1.2_linux-jessie-amd64.deb \
|
&& 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 - \
|
&& echo '40e8b906de658a2221b15e4e8cd82565a47d7ee8 wkhtmltox.deb' | sha1sum -c - \
|
||||||
&& dpkg --force-depends -i wkhtmltox.deb \
|
&& dpkg --force-depends -i wkhtmltox.deb \
|
||||||
@ -30,11 +45,21 @@ RUN set -x; \
|
|||||||
&& apt-get -y install -f --no-install-recommends \
|
&& apt-get -y install -f --no-install-recommends \
|
||||||
&& rm -rf /var/lib/apt/lists/* odoo.deb
|
&& rm -rf /var/lib/apt/lists/* odoo.deb
|
||||||
|
|
||||||
|
# Install barcode font
|
||||||
|
RUN curl http://www.reportlab.com/ftp/pfbfer.zip --output /tmp/pfbfer.zip \
|
||||||
|
&& mkdir -p /usr/lib/python2.7/dist-packages/reportlab/fonts \
|
||||||
|
&& unzip /tmp/pfbfer.zip -d /usr/lib/python2.7/dist-packages/reportlab/fonts/
|
||||||
|
|
||||||
# Copy entrypoint script and Odoo configuration file
|
# Copy entrypoint script and Odoo configuration file
|
||||||
COPY ./entrypoint.sh /
|
COPY ./entrypoint.sh /
|
||||||
COPY ./openerp-server.conf /etc/odoo/
|
COPY ./openerp-server.conf /etc/odoo/
|
||||||
RUN chown odoo /etc/odoo/openerp-server.conf
|
RUN chown odoo /etc/odoo/openerp-server.conf
|
||||||
|
|
||||||
|
RUN locale-gen en_GB.UTF-8
|
||||||
|
ENV LANG en_GB.UTF-8
|
||||||
|
ENV LANGUAGE en_GB:en
|
||||||
|
ENV LC_ALL en_GB.UTF-8
|
||||||
|
|
||||||
# Mount /var/lib/odoo to allow restoring filestore and /mnt/extra-addons for users addons
|
# Mount /var/lib/odoo to allow restoring filestore and /mnt/extra-addons for users addons
|
||||||
RUN mkdir -p /mnt/extra-addons \
|
RUN mkdir -p /mnt/extra-addons \
|
||||||
&& chown -R odoo /mnt/extra-addons
|
&& chown -R odoo /mnt/extra-addons
|
||||||
@ -46,8 +71,5 @@ EXPOSE 8069 8071
|
|||||||
# Set the default config file
|
# Set the default config file
|
||||||
ENV OPENERP_SERVER /etc/odoo/openerp-server.conf
|
ENV OPENERP_SERVER /etc/odoo/openerp-server.conf
|
||||||
|
|
||||||
# Set default user when running the container
|
|
||||||
USER odoo
|
|
||||||
|
|
||||||
ENTRYPOINT ["/entrypoint.sh"]
|
ENTRYPOINT ["/entrypoint.sh"]
|
||||||
CMD ["openerp-server"]
|
CMD ["openerp-server"]
|
||||||
|
@ -10,15 +10,18 @@ set -e
|
|||||||
export PGHOST PGPORT PGUSER PGPASSWORD
|
export PGHOST PGPORT PGUSER PGPASSWORD
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
--)
|
--)
|
||||||
shift
|
shift
|
||||||
exec openerp-server "$@"
|
exec gosu odoo openerp-server "$@"
|
||||||
;;
|
;;
|
||||||
-*)
|
-*)
|
||||||
exec openerp-server "$@"
|
exec gosu odoo openerp-server "$@"
|
||||||
;;
|
;;
|
||||||
*)
|
openerp-server)
|
||||||
exec "$@"
|
exec gosu odoo "$@"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
exec "$@"
|
||||||
esac
|
esac
|
||||||
|
|
||||||
exit 1
|
exit 1
|
||||||
|
Loading…
Reference in New Issue
Block a user