Skip to Content
Menu
This question has been flagged
1 Reply
7230 Views

Although I believe I am running docker as the Odoo Docker Hub "How To > Start an Odoo Instance" (https://hub.docker.com/_/odoo) describes, the --link arg still complains when you try to run the factory odoo image and try link the db container to the odoo container:

My setup:
MacOS 10.13.6
Docker version 20.10.0, build 7287ab3
Odoo Docker Hub Image tagged 13.0 pulled and available
Successfully running pulled postgres container which shows its name as "db"

The attempt to docker run the odoo image tagged odoo:13.0 below, (mildly sanitized for posting):

terminal-prompt: docker images
REPOSITORY   TAG        CREATED        SIZE
odoo                 13.0       6 days ago      1.21GB
postgres              10       7 days ago      200MB

terminal-prompt: docker container ls
IMAGE           CREATED       STATUS         PORTS        NAMES
postgres:10   4 hours ago   Up 4 hours   1234/tcp   db

terminal-prompt: docker stats
NAME      CPU %     MEM USAGE / LIMIT     MEM %     NET I/O       BLOCK I/O         PIDS
db              0.00%     47.75MiB / 1.942GiB         2.40%    1.66kB / 0B   36.8MB / 40.8MB    7

terminal-prompt: docker run odoo:13.0 -p 8069:8069 --name odoo --link db:db -t odoo

Database connection failure: could not translate host name "db" to address: Name or service not known


Has anyone else successfully run the 13.0 tagged docker image recently?

Thanks in advance.

Avatar
Discard
Best Answer

Here mentioned https://github.com/docker/for-mac/issues/2670 in macos, it's hard to link to internal IP addresses used by containers (some difference w.r.t docker linux)

You could install docker desktop for mac and try again.


but, You'd better follow the docker-compose.yml section (with an odoo.conf) mentioned in https://hub.docker.com/_/odoo,it's benefit that:

1) more like a prod env, no changes needed when later you move to production.

2) you can name the odoo/db to any name and use any port -- multi odoo&db instances can running at the same time for debuging/comparing purpose.

Avatar
Discard
Related Posts Replies Views Activity
1
May 24
329
2
Oct 23
4281
2
Nov 22
5674
0
May 22
1016
3
Sep 21
5672