= Using network connect to access the container on the bridge network does not accomplish creating a container that is reachable from its host’s network. The network connect command connects a container to an existing network, but it does not expose the container’s ports to the host1. The bridge network is the default network that Docker creates for containers, and it provides isolation from the host network2. To create a container that is reachable from its host’s network, you need to use the host network driver, which disables network isolation and uses the host’s network stack directly3. Alternatively, you can use the port mapping feature to publish specific ports of the container to the host4. References:
docker network connect | Docker Docs
Bridge network driver | Docker Docs
Host network driver | Docker Docs
Publish ports on the host | Docker Docs
Contribute your Thoughts:
Chosen Answer:
This is a voting comment (?). You can switch to a simple comment. It is better to Upvote an existing comment if you don't have anything to add.
Submit