Skip to content

Building the docker image from scratch #295

@scientronic92

Description

@scientronic92

I made a docker file to run Odoo, but the problem is that Odoo container can't find DB container even if ping by IP is working.

##Odoo Dockerfile

FROM ubuntu:19.04

WORKDIR /

COPY odoo13-enterprise.deb .

Copy wkhtmltox_0.12.5-1.bionic_amd64.deb .

USER root

CMD ["bash"]

ENV LANG=C.UTF-8

RUN apt-get update         && apt-get install -y --no-install-recommends             ca-certificates             curl             dirmngr             fonts-noto-cjk             gnupg             libssl-dev             nodejs             npm             python3-num2words             python3-pip             python3-phonenumbers             python3-pyldap             python3-qrcode             python3-renderpm             python3-setuptools             python3-slugify             python3-vobject             python3-watchdog             python3-xlrd             python3-xlwt             xz-utils		apt-utils

RUN npm install -g rtlcss

RUN apt-get update          && apt-get install -y postgresql-client

RUN adduser odoo

RUN mkdir /var/lib/odoo

VOLUME [/var/lib/odoo /mnt/extra-addons]

RUN apt install ./wkhtmltox_0.12.5-1.bionic_amd64.deb -y

RUN apt install ./odoo13-enterprise.deb -y

RUN chown odoo /etc/odoo/odoo.conf     && mkdir -p /mnt/extra-addons     && chown -R odoo /mnt/extra-addons

EXPOSE 8069 8071

USER odoo

CMD ["odoo"]

##Commands used:

docker run -d --network=bridge --hostname db --domainname db -e POSTGRES_USER=odoo -e POSTGRES_PASSWORD=odoo -e POSTGRES_DB=postgres --name db postgres
docker run -d --hostname=odoo13 -p 8069:8069 --network="bridge" --name odoo13 odoo13-e:1.0
docker network create odoo
docker network connect odoo odoo13
docker network connect odoo db

should I use --link property?
This is what appears on web browser:

Internal Server Error

The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions