Skip to content

Commit

Permalink
published port can be a range
Browse files Browse the repository at this point in the history
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
  • Loading branch information
ndeloof committed Jan 3, 2022
1 parent e8db802 commit 95f8b4f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion schema/compose-spec.json
Expand Up @@ -318,7 +318,7 @@
"mode": {"type": "string"},
"host_ip": {"type": "string"},
"target": {"type": "integer"},
"published": {"type": "integer"},
"published": {"type": ["string", "integer"]},
"protocol": {"type": "string"}
},
"additionalProperties": false,
Expand Down
8 changes: 7 additions & 1 deletion spec.md
Expand Up @@ -1494,7 +1494,7 @@ The long form syntax allows the configuration of additional fields that can't be
expressed in the short form.

- `target`: the container port
- `published`: the publicly exposed port
- `published`: the publicly exposed port. Can be set as a range using syntax `start-end`, then actual port SHOULD be assigned within this range based on available ports.
- `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.
Expand All @@ -1506,6 +1506,12 @@ ports:
published: 8080
protocol: tcp
mode: host

- target: 80
host_ip: 127.0.0.1
published: 8000-9000
protocol: tcp
mode: host
```

### privileged
Expand Down

0 comments on commit 95f8b4f

Please sign in to comment.