devcontainers / devcontainers/templates
Error: Conflicting options: port publishing and the container type network mode with IntelliJ
- Dominant language
- Shell
- Stars
- 1.4k
- Forks
- 393
- Avg merge
- 2h 3m
- Merged PRs (30d)
- 1
Description
I encountered an error with port publishing and the container type network mode while using IntelliJ. It seems to be related to the network mode setting.
Error: conflicting options: port publishing and the container type network mode
The issue seems to occur due to the network mode configuration in the docker-compose.yml. Specifically, in [javascript-node-postgres](https://github.com/devcontainers/templates/blob/main/src/javascript-node-postgres/.devcontainer/docker-compose.yml) and simalar.
The error is resolved if the network_mode setting is switched between app and db services. For instance, instead of using network_mode: service:db within the app, using network_mode: service:app within db resolves the error.
References:
[YouTrack Issue](https://youtrack.jetbrains.com/issue/IJPL-65932/Devcontainers-Error-response-from-daemon-conflicting-options-port-publishing-and-the-container-type-network-mode)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.