commit 121e4fdc1d17d978e37b03a5331c70cca4bd3344 Author: Aaron Bohy Date: Wed Dec 10 12:20:15 2014 +0100 [ADD] Odoo Dockerfile diff --git a/8.0/Dockerfile b/8.0/Dockerfile new file mode 100644 index 0000000..a399556 --- /dev/null +++ b/8.0/Dockerfile @@ -0,0 +1,39 @@ +FROM debian:wheezy +MAINTAINER Odoo S.A. + +RUN apt-get update && \ + apt-get install -y \ + ca-certificates \ + wget && \ + rm -rf /var/lib/apt/lists/* + +# Install lessc and less-plugin-clean-css +RUN wget -O - https://deb.nodesource.com/setup | bash - +RUN apt-get -y install nodejs +RUN npm install -g less less-plugin-clean-css + +# Install wkhtmltopdf +RUN wget http://downloads.sourceforge.net/project/wkhtmltopdf/0.12.1/wkhtmltox-0.12.1_linux-wheezy-amd64.deb && \ + dpkg --force-depends -i wkhtmltox-0.12.1_linux-wheezy-amd64.deb && \ + apt-get -y install -f && \ + rm -f wkhtmltox-0.12.1_linux-wheezy-amd64.deb + +ENV ODOO_VERSION 8.0 +ENV ODOO_RELEASE 20141209 + +# Install Odoo +RUN apt-get -y install adduser python-support && \ + wget http://nightly.odoo.com/${ODOO_VERSION}/nightly/deb/odoo_${ODOO_VERSION}.${ODOO_RELEASE}_all.deb && \ + dpkg --force-depends -i odoo_${ODOO_VERSION}.${ODOO_RELEASE}_all.deb && \ + apt-get -y install -f --no-install-recommends && \ + rm -f odoo_${ODOO_VERSION}.${ODOO_RELEASE}_all.deb + +# Retrieve Odoo public key, add Odoo nightly to repo list for further updates +RUN wget -O - https://nightly.odoo.com/odoo.key | apt-key add - +RUN echo "deb http://nightly.odoo.com/${ODOO_VERSION}/nightly/deb/ ./" >> /etc/apt/sources.list + +# Run script +COPY run.sh /run.sh +RUN chmod u+x /run.sh + +CMD ["/run.sh"] diff --git a/8.0/run.sh b/8.0/run.sh new file mode 100644 index 0000000..db882f5 --- /dev/null +++ b/8.0/run.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +# set openerp-server.conf +echo "[options] +; This is the password that allows database operations: +; admin_passwd = admin +db_host = $DB_PORT_5432_TCP_ADDR +db_port = $DB_PORT_5432_TCP_PORT +db_user = odoo +db_password = odoo +addons_path = /usr/lib/python2.7/dist-packages/openerp/addons" > /etc/odoo/openerp-server.conf + +# create log file to prevent tail from displaying warnings +touch /var/log/odoo/odoo-server.log +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