danielbodart / portical

Portical manages UPnP port forwarding rules for Docker containers by just adding single label
https://github.com/danielbodart/portical
10 stars 3 forks source link

Error response from daemon: network xxx not found #1

Open hihp opened 7 months ago

hihp commented 7 months ago

Hello I have the following issue:

I set up an nginx container via docker-compose to have the label portical.upnp.forward: 80/tcp,443/tcp and have setup a portical container to run. I also have a lot of other containers running with various networks, in the output below I replaced their names with "networka", "networkb" and so on. Since I need nginx to communicate with all of the containers for which these networks were created, nginx is also connected to all of these networks.

When I first start the portical container and then the nginx container, I get the following log output from portical:

Finding all containers with label 'portical.upnp.forward' set... Listening for Docker 'start' events with label 'portical.upnp.forward'... Error response from daemon: network networkanetworkbnetworkcnetworkd not found Setting up portical: (80:80/tcp) nginx... Unsupported network driver: . Skipping... Setting up portical: (443:443/tcp) nginx... Unsupported network driver: . Skipping...

And yes, the log output clearly shows the network names to be specified as "networkanetworkbnetworkcnetworkd", i.e. all network names right one after the other without any spaces or something like that.

I am at a loss here. Did I do something wrong?

danielbodart commented 6 months ago

No that sounds like a bug or missing feature on my side, I'd never thought about multiple networks for the same container, but your use case makes sense. Could you share some of you docker compose config for the nginx container so I can understand how you have done that? How do you tell which network you want nginx to listen on or is that just by an IP address convention?