alvarezsh
alvarezsh

Reputation: 503

Odoo example with docker compose no work

This is oficial Odoo file docker-compose example:

version: '2'
services:
  web:
    image: odoo:10.0
    depends_on:
      - db
    ports:
      - "8069:8069"
    volumes:
      - odoo-web-data:/var/lib/odoo
      - ./config:/etc/odoo
      - ./addons:/mnt/extra-addons
  db:
    image: postgres:9.4
    environment:
      - POSTGRES_PASSWORD=odoo
      - POSTGRES_USER=odoo
      - PGDATA=/var/lib/postgresql/data/pgdata
    volumes:
      - odoo-db-data:/var/lib/postgresql/data/pgdata
volumes:
  odoo-web-data:
  odoo-db-data:

When I run 'docker-compose up -d' output the next error:

ERROR: for test2_db_1  Cannot start service db: failed to create endpoint test2_db_1 on network test2_default: failed to add the host (veth95f6516) <=> sandbox (veth4949623) pair interfaces: operation not supported

ERROR: for db  Cannot start service db: failed to create endpoint test2_db_1 on network test2_default: failed to add the host (veth95f6516) <=> sandbox (veth4949623) pair interfaces: operation not supported
ERROR: Encountered errors while bringing up the project.

The docker-compose.yml file is within test2 directory.

This is Odoo with Docker docs: https://hub.docker.com/_/odoo/

What can be happening?

Thanks!

Upvotes: 0

Views: 813

Answers (1)

Tarun Lalwani
Tarun Lalwani

Reputation: 146630

Whenever you see errors related veth interfaces, it usually means that docker service has gone in some state where the network allocation doesn't work

ERROR: for test2_db_1  Cannot start service db: failed to create endpoint test2_db_1 on network test2_default: failed to add the host (veth95f6516) <=> sandbox (veth4949623) pair interfaces: operation not supported

ERROR: for db  Cannot start service db: failed to create endpoint test2_db_1 on network test2_default: failed to add the host (veth95f6516) <=> sandbox (veth4949623) pair interfaces: operation not supported
ERROR: Encountered errors while bringing up the project.

You should restart the docker service in such cases. If that doesn't help then restart the whole system

Upvotes: 2

Related Questions