199k views
5 votes
How to create and configure a bridge network to work with a given subnet and gateway?

A) docker network create --subnet= --gateway= my-bridge-network
B) docker network configure --subnet= --gateway= my-bridge-network
C) docker network bridge --subnet= --gateway= my-bridge-network
D) docker network add --subnet= --gateway= my-bridge-network

User Saurab
by
8.1k points

1 Answer

3 votes

Final answer:

To create and configure a bridge network in Docker, you can use the docker network create command with the appropriate subnet and gateway options.

Step-by-step explanation:

To create and configure a bridge network in Docker, you can use the docker network create command. This command allows you to specify the --subnet and --gateway options to define the desired subnet and gateway for the network. Here's an example:

docker network create --subnet=192.168.0.0/24 --gateway=192.168.0.1 my-bridge-network

In the above example, a bridge network named my-bridge-network is created with the subnet 192.168.0.0/24 and the gateway 192.168.0.1.

User Sofiaguyang
by
9.3k points