Comments (2)
The error message you're seeing is due to a conflict between the network_mode: service:db
option and the port publishing options in your Docker Compose file.
When you set network_mode: service:<name>
, it means your service app is using the network stack of the service db
. In this mode, it doesn't have its own network space, so you can't publish ports directly from this service. That's why you're seeing a conflict.
If you want your app service to communicate with the db service and also publish ports, you should use the default bridge network mode (which is used when network_mode is not specified). In this mode, all services can communicate with each other and you can publish ports from any service.
from templates.
Feel free to reopen the issue if this comment doesn't resolve your problem or if you have any follow-up questions. Thanks!
from templates.
Related Issues (20)
- dotnet template should include a volume mount for nuget package caching HOT 1
- include C# Dev Kit in dotnet template HOT 3
- Pin PostgreSQL version in `*-postgres` templates HOT 2
- javascript-node-mongo not building the container HOT 2
- Could not connect to mariaDB with imageVariant default HOT 1
- Docs about templates usage and behavior HOT 4
- Is there a way to `publish` template as image?
- typescript-node npm scripts error access HOT 1
- Stuck in "Replacing imageVariant with ..." step HOT 7
- I am a greener. Just ask a simple question about the toolchain in the container. HOT 1
- C+
- Active HOT 2
- postCreateCommand Permission denied HOT 2
- SSH key sharing works only for 0-20 HOT 4
- how to properly use apt-get for dev container? HOT 1
- PowerShell Dev Container not published to Microsoft Artifact Registry HOT 1
- "Permission Denied Error when Running Non-Root Podman Development Container: mkdir: cannot create directory β/rootβ" HOT 1
- Error: Conflicting options: port publishing and the container type network mode with IntelliJ HOT 2
- devcontainer config overwrites my dependabot.yml HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from templates.