[FIX] Dockerfile fixed according to tianon's review
This commit is contained in:
parent
94ef35affe
commit
34987f1d77
@ -1,37 +1,44 @@
|
|||||||
FROM debian:wheezy
|
FROM debian:jessie
|
||||||
MAINTAINER Odoo S.A. <info@odoo.com>
|
MAINTAINER Odoo S.A. <info@odoo.com>
|
||||||
|
|
||||||
# Install some deps, lessc and less-plugin-clean-css, and wkhtmltopdf
|
# Install some deps, lessc and less-plugin-clean-css, and wkhtmltopdf
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& apt-get install -y \
|
&& apt-get install -y \
|
||||||
ca-certificates \
|
|
||||||
wget \
|
|
||||||
adduser \
|
adduser \
|
||||||
|
ca-certificates \
|
||||||
|
curl \
|
||||||
|
npm \
|
||||||
python-support \
|
python-support \
|
||||||
&& wget -O - https://deb.nodesource.com/setup | bash - \
|
|
||||||
&& apt-get -y install nodejs \
|
|
||||||
&& npm install -g less less-plugin-clean-css \
|
&& npm install -g less less-plugin-clean-css \
|
||||||
&& wget http://downloads.sourceforge.net/project/wkhtmltopdf/0.12.1/wkhtmltox-0.12.1_linux-wheezy-amd64.deb \
|
&& ln -s /usr/bin/nodejs /usr/bin/node \
|
||||||
&& dpkg --force-depends -i wkhtmltox-0.12.1_linux-wheezy-amd64.deb \
|
&& curl -o wkhtmltox.deb -SL http://downloads.sourceforge.net/project/wkhtmltopdf/0.12.1/wkhtmltox-0.12.1_linux-wheezy-amd64.deb \
|
||||||
|
&& echo '07d397b32f91722de683e8777df2ddd6c49662c2 wkhtmltox.deb' | sha1sum -c - \
|
||||||
|
&& dpkg --force-depends -i wkhtmltox.deb \
|
||||||
&& apt-get -y install -f \
|
&& apt-get -y install -f \
|
||||||
&& rm -f wkhtmltox-0.12.1_linux-wheezy-amd64.deb
|
&& rm -f wkhtmltox.deb
|
||||||
|
|
||||||
ENV ODOO_VERSION 8.0
|
# Grab gosu for easy step-down from root
|
||||||
ENV ODOO_RELEASE 20141209
|
RUN gpg --keyserver pgp.mit.edu --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4
|
||||||
|
RUN 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 Odoo
|
# Install Odoo
|
||||||
RUN wget http://nightly.odoo.com/${ODOO_VERSION}/nightly/deb/odoo_${ODOO_VERSION}.${ODOO_RELEASE}_all.deb \
|
ENV ODOO_VERSION 8.0
|
||||||
&& dpkg --force-depends -i odoo_${ODOO_VERSION}.${ODOO_RELEASE}_all.deb \
|
ENV ODOO_RELEASE 20141229
|
||||||
|
RUN curl -o odoo.deb -SL http://nightly.odoo.com/${ODOO_VERSION}/nightly/deb/odoo_${ODOO_VERSION}.${ODOO_RELEASE}_all.deb \
|
||||||
|
&& dpkg --force-depends -i odoo.deb \
|
||||||
&& apt-get -y install -f --no-install-recommends \
|
&& apt-get -y install -f --no-install-recommends \
|
||||||
&& rm -f odoo_${ODOO_VERSION}.${ODOO_RELEASE}_all.deb
|
&& rm -f odoo.deb
|
||||||
|
|
||||||
# Retrieve Odoo public key, add Odoo nightly to repo list for further updates
|
# Retrieve Odoo public key and add Odoo nightly to repo list for further updates
|
||||||
RUN wget -O - https://nightly.odoo.com/odoo.key | apt-key add - \
|
RUN apt-key adv --keyserver pgp.mit.edu --recv-keys 0xdef2a2198183cbb5 \
|
||||||
&& echo "deb http://nightly.odoo.com/${ODOO_VERSION}/nightly/deb/ ./" >> /etc/apt/sources.list
|
&& echo "deb http://nightly.odoo.com/${ODOO_VERSION}/nightly/deb/ ./" >> /etc/apt/sources.list
|
||||||
|
|
||||||
# Run script
|
# Run script
|
||||||
COPY run.sh /run.sh
|
COPY ./run.sh /
|
||||||
RUN chmod u+x /run.sh
|
|
||||||
|
|
||||||
# Mount /var/lib/odoo to allow restoring filestore
|
# Mount /var/lib/odoo to allow restoring filestore
|
||||||
VOLUME ["/var/lib/odoo"]
|
VOLUME ["/var/lib/odoo"]
|
||||||
|
12
8.0/run.sh
Normal file → Executable file
12
8.0/run.sh
Normal file → Executable file
@ -8,14 +8,8 @@ db_host = $DB_PORT_5432_TCP_ADDR
|
|||||||
db_port = $DB_PORT_5432_TCP_PORT
|
db_port = $DB_PORT_5432_TCP_PORT
|
||||||
db_user = odoo
|
db_user = odoo
|
||||||
db_password = odoo
|
db_password = odoo
|
||||||
|
data_dir = /var/lib/odoo
|
||||||
addons_path = /usr/lib/python2.7/dist-packages/openerp/addons" > /etc/odoo/openerp-server.conf
|
addons_path = /usr/lib/python2.7/dist-packages/openerp/addons" > /etc/odoo/openerp-server.conf
|
||||||
|
|
||||||
# create log file to prevent tail from displaying warnings
|
# start Odoo
|
||||||
touch /var/log/odoo/odoo-server.log
|
exec gosu odoo /usr/bin/openerp-server --config /etc/odoo/openerp-server.conf
|
||||||
chmod o+rw /var/log/odoo/odoo-server.log
|
|
||||||
|
|
||||||
# start odoo
|
|
||||||
su odoo -s /bin/bash -c "/usr/bin/openerp-server --config /etc/odoo/openerp-server.conf --addons-path /usr/lib/python2.7/dist-packages/openerp/addons"
|
|
||||||
|
|
||||||
# display logs
|
|
||||||
tail -F /var/log/odoo/odoo-server.log
|
|
||||||
|
Loading…
Reference in New Issue
Block a user