Docker Network Operations: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 18: Line 18:
     [--driver=bridge] \
     [--driver=bridge] \
     [--[[Docker_Networking_Concepts#User-Defined_Bridge_Network_Subnet|subnet]]=172.29.0.0/16] \
     [--[[Docker_Networking_Concepts#User-Defined_Bridge_Network_Subnet|subnet]]=172.29.0.0/16] \
     [--ip-range=172.28.5.0/24 ] \
     [--[[Docker_Networking_Concepts#User-Defined_Bridge_Network_IP_Range|ip-range]]=172.28.5.0/24 ] \
     [--gateway=172.29.5.253] \
     [--[[Docker_Networking_Concepts#User-Defined_Bridge_Network_Gateway|gateway]]=172.29.5.253] \
   <''user-defined-bridge-network-name''>
   <''user-defined-bridge-network-name''>



Revision as of 16:42, 30 April 2018

Internal

Overview

List Networks

docker network ls

Create a New User-Defined Bridge Network

https://docs.docker.com/engine/reference/commandline/network_create/#specify-advanced-options

Command creates a user-defined bridge network:

docker network create \
   [--driver=bridge] \
   [--subnet=172.29.0.0/16] \
   [--ip-range=172.28.5.0/24 ] \
   [--gateway=172.29.5.253] \
 <user-defined-bridge-network-name>

Remove a User-Defined Bridge Network

docker network rm <user-defined-bridge-network-name>