diff --git a/schema/compose-spec.json b/schema/compose-spec.json index a4d5cfce..4b1ac188 100644 --- a/schema/compose-spec.json +++ b/schema/compose-spec.json @@ -316,6 +316,7 @@ "type": "object", "properties": { "mode": {"type": "string"}, + "host_ip": {"type": "string"}, "target": {"type": "integer"}, "published": {"type": "integer"}, "protocol": {"type": "string"} diff --git a/spec.md b/spec.md index 10e5a3ea..5f1d0e12 100644 --- a/spec.md +++ b/spec.md @@ -1491,12 +1491,14 @@ expressed in the short form. - `target`: the container port - `published`: the publicly exposed port +- `host_ip`: the Host IP mapping, unspecified means all network interfaces (`0.0.0.0`) - `protocol`: the port protocol (`tcp` or `udp`), unspecified means any protocol - `mode`: `host` for publishing a host port on each node, or `ingress` for a port to be load balanced. ```yml ports: - target: 80 + host_ip: 127.0.0.1 published: 8080 protocol: tcp mode: host