Docker container with host network and bridge network

Hi All

I am new to docker container framework so request suggestions on the below problem.

I am trying to run a container with networking set to my own user defined bridge as well as host networking .

The bridge network would be used for containers sharing the bridge network .

The host network would be used to communicate with docker host application .

Here is the command I used to create my container -

docker run -itd --net=host --net=sample-net centos where sample-net is my own user defined bridge .

I have a process running on loopback interface on the host but if i try to connect it from inside the container it says Connection refused .

Hence I would request feedback if this is the correct way to do it .

Thanks

Did you ever find a solution to this? I have a similar challenge I’m trying to solve. I need one interface in the container on the host network (an interface with no IP address configured). This is the “capture” interface for Zeek. The second interface on a normal bridge network. This is the management interface.