Search or ask Docker

Network

Network schema in Docker Engine API 1.57.

View Markdown

Schema

Type: object

Attachable

Type: boolean

Whether a global / swarm scope network is manually attachable by regular containers from workers in swarm mode.
All schema constraints and annotations
{
  "default": false,
  "description": "Whether a global / swarm scope network is manually attachable by regular\ncontainers from workers in swarm mode.\n",
  "example": false,
  "type": "boolean",
  "x-nullable": false,
  "x-omitempty": false
}
ConfigFrom

Schema: ConfigReference

All schema constraints and annotations
{
  "$ref": "#/components/schemas/ConfigReference",
  "x-nullable": false,
  "x-omitempty": false
}
ConfigOnly

Type: boolean

Whether the network is a config-only network. Config-only networks are placeholder networks for network configurations to be used by other networks. Config-only networks cannot be used directly to run containers or services.
All schema constraints and annotations
{
  "default": false,
  "description": "Whether the network is a config-only network. Config-only networks are\nplaceholder networks for network configurations to be used by other\nnetworks. Config-only networks cannot be used directly to run containers\nor services.\n",
  "type": "boolean",
  "x-nullable": false,
  "x-omitempty": false
}
Created

Type: string

Date and time at which the network was created in RFC 3339 format with nano-seconds.
All schema constraints and annotations
{
  "description": "Date and time at which the network was created in\n[RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds.\n",
  "example": "2016-10-19T04:33:30.360899459Z",
  "format": "dateTime",
  "type": "string",
  "x-go-type": {
    "hints": {
      "nullable": false
    },
    "import": {
      "package": "time"
    },
    "type": "Time"
  },
  "x-omitempty": false
}
Driver

Type: string

The name of the driver used to create the network (e.g. bridge, overlay).
All schema constraints and annotations
{
  "description": "The name of the driver used to create the network (e.g. `bridge`,\n`overlay`).\n",
  "example": "overlay",
  "type": "string",
  "x-omitempty": false
}
EnableIPv4

Type: boolean

Whether the network was created with IPv4 enabled.
All schema constraints and annotations
{
  "description": "Whether the network was created with IPv4 enabled.\n",
  "example": true,
  "type": "boolean",
  "x-omitempty": false
}
EnableIPv6

Type: boolean

Whether the network was created with IPv6 enabled.
All schema constraints and annotations
{
  "description": "Whether the network was created with IPv6 enabled.\n",
  "example": false,
  "type": "boolean",
  "x-omitempty": false
}
IPAM

Schema: IPAM

The network's IP Address Management.
All schema constraints and annotations
{
  "$ref": "#/components/schemas/IPAM",
  "description": "The network's IP Address Management.\n",
  "x-nullable": false,
  "x-omitempty": false
}
Id

Type: string

ID that uniquely identifies a network on a single machine.
All schema constraints and annotations
{
  "description": "ID that uniquely identifies a network on a single machine.\n",
  "example": "7d86d31b1478e7cca9ebed7e73aa0fdeec46c5ca29497431d3007d2d9e15ed99",
  "type": "string",
  "x-go-name": "ID",
  "x-omitempty": false
}
Ingress

Type: boolean

Whether the network is providing the routing-mesh for the swarm cluster.
All schema constraints and annotations
{
  "default": false,
  "description": "Whether the network is providing the routing-mesh for the swarm cluster.\n",
  "example": false,
  "type": "boolean",
  "x-nullable": false,
  "x-omitempty": false
}
Internal

Type: boolean

Whether the network is created to only allow internal networking connectivity.
All schema constraints and annotations
{
  "default": false,
  "description": "Whether the network is created to only allow internal networking\nconnectivity.\n",
  "example": false,
  "type": "boolean",
  "x-nullable": false,
  "x-omitempty": false
}
Labels

Type: object

Metadata specific to the network being created.
All schema constraints and annotations
{
  "additionalProperties": {
    "type": "string"
  },
  "description": "Metadata specific to the network being created.\n",
  "example": {
    "com.example.some-label": "some-value",
    "com.example.some-other-label": "some-other-value"
  },
  "type": "object",
  "x-omitempty": false
}
Name

Type: string

Name of the network.
All schema constraints and annotations
{
  "description": "Name of the network.\n",
  "example": "my_network",
  "type": "string",
  "x-omitempty": false
}
Options

Type: object

Network-specific options uses when creating the network.
All schema constraints and annotations
{
  "additionalProperties": {
    "type": "string"
  },
  "description": "Network-specific options uses when creating the network.\n",
  "example": {
    "com.docker.network.bridge.default_bridge": "true",
    "com.docker.network.bridge.enable_icc": "true",
    "com.docker.network.bridge.enable_ip_masquerade": "true",
    "com.docker.network.bridge.host_binding_ipv4": "0.0.0.0",
    "com.docker.network.bridge.name": "docker0",
    "com.docker.network.driver.mtu": "1500"
  },
  "type": "object",
  "x-omitempty": false
}
Peers

Type: array

List of peer nodes for an overlay network. This field is only present for overlay networks, and omitted for other network types.
Array item

Schema: PeerInfo

All schema constraints and annotations
{
  "description": "List of peer nodes for an overlay network. This field is only present\nfor overlay networks, and omitted for other network types.\n",
  "items": {
    "$ref": "#/components/schemas/PeerInfo"
  },
  "type": "array",
  "x-omitempty": true
}
Scope

Type: string

The level at which the network exists (e.g. swarm for cluster-wide or local for machine level)
All schema constraints and annotations
{
  "description": "The level at which the network exists (e.g. `swarm` for cluster-wide\nor `local` for machine level)\n",
  "example": "local",
  "type": "string",
  "x-omitempty": false
}
All schema constraints and annotations
{
  "properties": {
    "Attachable": {
      "default": false,
      "description": "Whether a global / swarm scope network is manually attachable by regular\ncontainers from workers in swarm mode.\n",
      "example": false,
      "type": "boolean",
      "x-nullable": false,
      "x-omitempty": false
    },
    "ConfigFrom": {
      "$ref": "#/components/schemas/ConfigReference",
      "x-nullable": false,
      "x-omitempty": false
    },
    "ConfigOnly": {
      "default": false,
      "description": "Whether the network is a config-only network. Config-only networks are\nplaceholder networks for network configurations to be used by other\nnetworks. Config-only networks cannot be used directly to run containers\nor services.\n",
      "type": "boolean",
      "x-nullable": false,
      "x-omitempty": false
    },
    "Created": {
      "description": "Date and time at which the network was created in\n[RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds.\n",
      "example": "2016-10-19T04:33:30.360899459Z",
      "format": "dateTime",
      "type": "string",
      "x-go-type": {
        "hints": {
          "nullable": false
        },
        "import": {
          "package": "time"
        },
        "type": "Time"
      },
      "x-omitempty": false
    },
    "Driver": {
      "description": "The name of the driver used to create the network (e.g. `bridge`,\n`overlay`).\n",
      "example": "overlay",
      "type": "string",
      "x-omitempty": false
    },
    "EnableIPv4": {
      "description": "Whether the network was created with IPv4 enabled.\n",
      "example": true,
      "type": "boolean",
      "x-omitempty": false
    },
    "EnableIPv6": {
      "description": "Whether the network was created with IPv6 enabled.\n",
      "example": false,
      "type": "boolean",
      "x-omitempty": false
    },
    "IPAM": {
      "$ref": "#/components/schemas/IPAM",
      "description": "The network's IP Address Management.\n",
      "x-nullable": false,
      "x-omitempty": false
    },
    "Id": {
      "description": "ID that uniquely identifies a network on a single machine.\n",
      "example": "7d86d31b1478e7cca9ebed7e73aa0fdeec46c5ca29497431d3007d2d9e15ed99",
      "type": "string",
      "x-go-name": "ID",
      "x-omitempty": false
    },
    "Ingress": {
      "default": false,
      "description": "Whether the network is providing the routing-mesh for the swarm cluster.\n",
      "example": false,
      "type": "boolean",
      "x-nullable": false,
      "x-omitempty": false
    },
    "Internal": {
      "default": false,
      "description": "Whether the network is created to only allow internal networking\nconnectivity.\n",
      "example": false,
      "type": "boolean",
      "x-nullable": false,
      "x-omitempty": false
    },
    "Labels": {
      "additionalProperties": {
        "type": "string"
      },
      "description": "Metadata specific to the network being created.\n",
      "example": {
        "com.example.some-label": "some-value",
        "com.example.some-other-label": "some-other-value"
      },
      "type": "object",
      "x-omitempty": false
    },
    "Name": {
      "description": "Name of the network.\n",
      "example": "my_network",
      "type": "string",
      "x-omitempty": false
    },
    "Options": {
      "additionalProperties": {
        "type": "string"
      },
      "description": "Network-specific options uses when creating the network.\n",
      "example": {
        "com.docker.network.bridge.default_bridge": "true",
        "com.docker.network.bridge.enable_icc": "true",
        "com.docker.network.bridge.enable_ip_masquerade": "true",
        "com.docker.network.bridge.host_binding_ipv4": "0.0.0.0",
        "com.docker.network.bridge.name": "docker0",
        "com.docker.network.driver.mtu": "1500"
      },
      "type": "object",
      "x-omitempty": false
    },
    "Peers": {
      "description": "List of peer nodes for an overlay network. This field is only present\nfor overlay networks, and omitted for other network types.\n",
      "items": {
        "$ref": "#/components/schemas/PeerInfo"
      },
      "type": "array",
      "x-omitempty": true
    },
    "Scope": {
      "description": "The level at which the network exists (e.g. `swarm` for cluster-wide\nor `local` for machine level)\n",
      "example": "local",
      "type": "string",
      "x-omitempty": false
    }
  },
  "type": "object"
}