Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker compose validation allows both networks and network_mode #49

Open
pipex opened this issue Apr 16, 2024 · 0 comments
Open

Docker compose validation allows both networks and network_mode #49

pipex opened this issue Apr 16, 2024 · 0 comments

Comments

@pipex
Copy link
Contributor

pipex commented Apr 16, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant