官术网_书友最值得收藏!

Networking commands

The parent command for managing networks in Docker is docker network. You can list the whole command set using the docker network help command, as you can see in the following screenshot:

To have a detailed syntax and description of each option available for a specific command, use the -help switch for each of the commands. For example, to get the description of parameters available for docker network create, execute the docker network create -help.

Let's briefly describe each command available:

  • $ docker network ls: This is the command we have been using previously, it simply lists networks available for your containers. It will output the network identifier, its name, the driver being used, and a scope of the network
  • $ docker network create: Creates new network. The full syntax of the command is, docker network create [OPTIONS] NETWORK. We will use the command in a short while
  • $ docker network rm: The dockercnetworkcrm  command simply removes the network
  • $ docker network connect: Connects the container to the specific network
  • $ docker network disconnect: As the name suggests, it will disconnect the container from the network
  • $ docker network inspect: The docker network inspect command displays detailed information about the network. It's very useful, if you have network issues. We are going to create and inspect our network now

The docker network inspect command displays detailed information about the network. It's very useful if you have network issues. We are going to create and inspect our network now.

主站蜘蛛池模板: 永德县| 南木林县| 巩义市| 政和县| 库车县| 调兵山市| 宜宾县| 南投县| 常山县| 荣昌县| 合水县| 乐陵市| 西藏| 湖口县| 科技| 会同县| 乐至县| 鄂温| 翁牛特旗| 兴文县| 石景山区| 上犹县| 郴州市| 兴仁县| 黄龙县| 聊城市| 宝兴县| 铜梁县| 锡林浩特市| 定远县| 龙岩市| 济源市| 柳河县| 镇沅| 无锡市| 青浦区| 镇原县| 马关县| 内乡县| 夏河县| 井陉县|