Public Repository

Last pushed: 2 years ago
Short Description
Short description is empty for this repo.
Full Description

DOCKER RUN:

docker run -d -p 8069:8069 sivasakthi/odoo

Databse:
i have used my local postgresql and also i have configured my local postgresql conf file.

TO connect local database to docker follow bellow steps.

1.in pg_hba.conf file add below line

IPv4 local connections:

host all all 172.17.0.0/16 trust
host all all localhost md5

  1. in postgresql.conf

Linsten addresses= '*'

  1. Add local ip in odoo-server.conf file

Docker file:

FROM ubuntu

MAINTAINER SIvasakthi

RUN echo "locales locales/locales_to_be_generated multiselect en_US.UTF-8 UTF-8" | debconf-set-selections &&\
echo "locales locales/default_environment_locale select en_US.UTF-8" | debconf-set-selections
RUN apt-get install locales -qq
RUN locale-gen en_US.UTF-8
ENV LC_ALL en_US.UTF-8

RUN apt-get update && \
apt-get install subversion git bzr bzrtools python-pip postgresql postgresql-server-dev-9.3 python-all-dev python-dev python-setuptools libxml2-dev libxslt1-dev libevent-dev libsasl2-dev libldap2-dev pkg-config libtiff5-dev libjpeg8-dev libjpeg-dev zlib1g-dev libfreetype6-dev liblcms2-dev liblcms2-utils libwebp-dev tcl8.6-dev tk8.6-dev python-tk libyaml-dev fontconfig -y

RUN apt-get install wget -y

RUN adduser --system --home=/opt/odoo --group odoo

RUN mkdir /var/log/odoo

WORKDIR /opt/odoo/

RUN git clone https://www.github.com/odoo/odoo --depth 1 --branch 9.0 --single-branch .

RUN pip install -r /opt/odoo/doc/requirements.txt

RUN pip install -r /opt/odoo/requirements.txt

RUN wget -qO- https://deb.nodesource.com/setup | sudo bash -

RUN apt-get update && \
apt-get install nodejs -y

RUN npm install -g less less-plugin-clean-css

WORKDIR /tmp

RUN wget http://download.gna.org/wkhtmltopdf/0.12/0.12.1/wkhtmltox-0.12.1_linux-trusty-amd64.deb

RUN dpkg -i wkhtmltox-0.12.1_linux-trusty-amd64.deb

RUN cp /usr/local/bin/wkhtmltopdf /usr/bin
RUN cp /usr/local/bin/wkhtmltoimage /usr/bin

ADD odoo-server.conf /etc/odoo-server.conf

ADD odoo-server /etc/init.d/odoo-server

RUN chmod 755 /etc/init.d/odoo-server

RUN chown root: /etc/init.d/odoo-server

RUN chown -R odoo: /opt/odoo/

RUN chown odoo:root /var/log/odoo

RUN chown odoo: /etc/odoo-server.conf

RUN chmod 640 /etc/odoo-server.conf

RUN update-rc.d odoo-server defaults

#RUN /etc/init.d/postgresql start && su postgres -c "createuser -s odoo"

#RUN chown -R postgres.postgres /var/lib/postgresql

#VOLUME ["/var/lib/postgresql"]

#RUN apt-get update && \

apt-get install supervisor -y && \

rm -rf /var/lib/apt/lists/ /tmp/ /var/tmp/*

#ADD supervisord.conf /etc/supervisor/conf.d/supervisord.conf

RUN apt-get clean && rm -rf /var/lib/apt/lists/ /tmp/ /var/tmp/

EXPOSE 8069 5432

#CMD ["/usr/bin/supervisord", "-n"]

start supervisor

#CMD ["/usr/bin/supervisord"]

ADD start.sh /
ADD start-daemon.sh /
ADD start-odoo.sh /

RUN chmod +x /start-daemon.sh
RUN chmod +x /start.sh
RUN chmod +x /start-odoo.sh

CMD /start-daemon.sh

odoo-server.conf:

[options]
admin_passwd = admin
db_host = 192.168.1.155
db_port = 5432
db_user = openerp
db_password = openerp
addons_path = /opt/odoo/addons
logfile = /var/log/odoo/odoo-server.log
xmlrpc_port = 8069

Docker Pull Command
Owner
sivasakthi