1.

Commands for Networking

Answer»
CommandMeaningSyntax 
Command for overlay networkThis is used to establish a distributed network between many Docker daemon hosts. docker network create -d overlay MyOverlayNetwork
Command for Bridge networkTo establish container test1 to bridge demo-bridge, type docker network connect demo-bridge test1. docker network create -d bridge MyBridgeNetwork
Command for removing a networkThis command s used to remove an overlay network 
docker network rm MyOverlayNetwork
Command for network listingThis command is used to listing the overlay networks docker network ls
Command for Getting Information About a NetworkWe can get information about an overlay network with the help of this command docker network inspect MyOverlayNetwork
Command for Connecting a Running Container to a NetworkBy using this command we can connect a container to network docker network connect MyOverlayNetwork nginx
Command for Connecting a Container to a Network When it StartsWhen the container starts we can use this command to connect a container to network docker container run -it -d --network=MyOverlayNetwork nginx
Command for Disconnecting a Container from a NetworkWe can use this Command for disconnecting a container from network docker network disconnect MyOverlayNetwork nginx
Command for Exposing PortsWe can expose the empty ports using this command EXPOSE <port_number>



Discussion

No Comment Found