A published port, in docker compose short syntax: [HOST_IP:][HOST_PORT[-RANGE]:]CONTAINER_PORT[-RANGE][/PROTOCOL].

hostPort is optional: ports: ["3000"] publishes container port 3000 on a host port picked by docker, which is not the same as 3000:3000.

Constructors

Properties

containerPort: number
containerPortEnd?: number
hostIp?: string
hostPort?: number
hostPortEnd?: number
protocol?: Protocol

Methods