unbound-docker icon indicating copy to clipboard operation
unbound-docker copied to clipboard

service unbound declares mutually exclusive `network_mode` and `networks`: invalid compose project

Open cmonty14 opened this issue 5 months ago • 5 comments

Describe the bug Running docker compose pull fails with error.

To Reproduce Steps to reproduce the behavior:

  1. Create compose file docker-compose.yml
  2. Run docker compose pull

Expected behavior Deployment of unbound container finishes w/o error.

Error messages service unbound declares mutually exclusive `network_mode` and `networks`: invalid compose project

Additional context Using a modified docker-compose.yml file:

version: '3'
services:
  unbound:
    container_name: unbound
    image: "mvance/unbound:latest"
    expose:
      - "53"
    networks:
     - dns
    network_mode: bridge
    ports:
      - target: 53
        published: 53
        protocol: tcp
        mode: host
      - target: 53
        published: 53
        protocol: udp
        mode: host
      - target: 8953
        published: 8953
        protocol: tcp
        mode: host
[...]

cmonty14 avatar Jan 28 '24 19:01 cmonty14