The Commands

This lesson lists all the relevant Docker network overlay commands with brief reminders of what each one does.

  • docker network create creates a new container network. The -d flag lets you specify the driver to use, and the most common driver is the overlay driver. You can also specify remote drivers from 3rd parties. For overlay networks, the control plane is encrypted by default. Just add the -o encrypted flag to encrypt the data plane (performance overheads may be incurred).

  • docker network ls lists all of the container networks visible to a Docker host. Docker hosts running in swarm mode only see overlay networks if they are hosting containers attached to that particular network. This keeps network-related gossip to a minimum.

  • docker network inspect shows you detailed information about a particular container network. This includes scope, driver, IPv4 and IPv4 info, subnet configuration, IP addresses of connected containers, VXLAN network ID, and encryption state.

  • docker network rm deletes a network

Get hands-on with 1400+ tech skills courses.