Search or ask Docker

PortSummary

PortSummary schema in Docker Engine API 1.57.

View Markdown

Schema

Type: object

Describes a port-mapping between the container and the host.
IP

Type: string

Host IP address that the container's port is mapped to
All schema constraints and annotations
{
  "description": "Host IP address that the container's port is mapped to",
  "format": "ip-address",
  "type": "string",
  "x-go-type": {
    "import": {
      "package": "net/netip"
    },
    "type": "Addr"
  }
}
PrivatePort · required

Type: integer

Port on the container
All schema constraints and annotations
{
  "description": "Port on the container",
  "format": "uint16",
  "type": "integer",
  "x-nullable": false
}
PublicPort

Type: integer

Port exposed on the host
All schema constraints and annotations
{
  "description": "Port exposed on the host",
  "format": "uint16",
  "type": "integer"
}
Type · required

Type: string

All schema constraints and annotations
{
  "enum": [
    "tcp",
    "udp",
    "sctp"
  ],
  "type": "string",
  "x-nullable": false
}
All schema constraints and annotations
{
  "description": "Describes a port-mapping between the container and the host.\n",
  "example": {
    "PrivatePort": 8080,
    "PublicPort": 80,
    "Type": "tcp"
  },
  "properties": {
    "IP": {
      "description": "Host IP address that the container's port is mapped to",
      "format": "ip-address",
      "type": "string",
      "x-go-type": {
        "import": {
          "package": "net/netip"
        },
        "type": "Addr"
      }
    },
    "PrivatePort": {
      "description": "Port on the container",
      "format": "uint16",
      "type": "integer",
      "x-nullable": false
    },
    "PublicPort": {
      "description": "Port exposed on the host",
      "format": "uint16",
      "type": "integer"
    },
    "Type": {
      "enum": [
        "tcp",
        "udp",
        "sctp"
      ],
      "type": "string",
      "x-nullable": false
    }
  },
  "required": [
    "PrivatePort",
    "Type"
  ],
  "type": "object"
}