Skip to content

Docker compose validation allows both networks and network_mode #49

@pipex

Description

@pipex

The following composition is rejected by docker-compose with service hello declares mutually exclusive network_modeandnetworks: invalid compose project

version: '2.4'

services: 
  hello:
    image: alpine
    command: ['sleep', 'infinity']
    networks: ['my-network']
    network_mode: host


networks:
  my-network:

While balena-compose allows it. Making the change might prevent invalid or ambiguous compositions reaching the supervisor

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions