צירוף קונטיינר למספר רשתות Docker

סיכום מבוסס בינה מלאכותית

The discussion revolves around joining a Docker container to multiple networks in the context of Discourse’s installation. shyguy asks about the proper method to use multiple Docker networks, noting that docker run doesn’t support multiple --network flags, which prevents using both an internal tunnel network and a wan network for building and traffic. They question whether launcher rebuild can be made to connect to multiple networks automatically. thoka confirms that the launcher currently lacks support for multiple networks and any hooks for customization, and suggests exploring how Discourse might adapt to this need, especially with the deprecation of Docker’s link feature. TyIsI adds that docker run now supports multiple --network flags, offering a potential workaround.

what is the ‘blessed by discourse’ method to use multiple docker networks? multiple --network invocations aren’t supported in docker run, so i don’t think i can specify multiple networks using docker_args.

i tunnel user requests to the edge via an --internal docker network, but having that as the only network causes launcher rebuild to fail since it needs internet. so i would want to have a wan network (i guess just for building?) and an internal tunnel network (real traffic).

do i really have to come up with something to docker network connect tunnel app after every build/start? can i have the discourse launcher do it?

thanks

Reading launcher there is neither any support for multiple networks nor any plugin / hook-machinery, which would allow implementing this outside of launcher in a way that would survive updates.

It would be interesting to learn, what minimal steps discourse would consider to adapt launcher to these needs, taking into account the deprecation of the (implemented but also unsupported) link feature.

I know it’s late to the party, but I figured I would update this topic with the latest information:

docker run does support multiple --network statements now.