docker 的 Odoo 示例没有工作

Odoo example with docker compose no work

这是Odoo官方文件docker-编写示例:

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:

当我运行'docker-compose up -d'输出下一个错误:

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.

docker-compose.yml 文件位于 test2 目录中。

这是带有 Docker 文档的 Odoo:https://hub.docker.com/_/odoo/

会发生什么?

谢谢!

每当您看到与 veth 接口相关的错误时,通常意味着 docker 服务处于某种网络分配不起作用的状态

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.

在这种情况下,您应该重新启动 docker 服务。如果这没有帮助,请重新启动整个系统