odoo / odoo/docker

Building the docker image from scratch

Open
#295 13 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Dockerfile
Stars
1.2k
Forks
1.7k
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the provided Dockerfile and the two docker run commands, then inspect the Odoo container logs and its database connection configuration. Reproduce the setup using the network commands shown. Done means the Odoo container connects to the PostgreSQL container and the web request no longer returns an internal server error.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, postgresql
Domain
databases, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.