File tree 1 file changed +7
-0
lines changed
content/reference/compose-file
1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -1572,6 +1572,11 @@ in the form:
1572
1572
- ` CONTAINER` is `port | range`.
1573
1573
- ` PROTOCOL` restricts ports to a specified protocol either `tcp` or `udp`(optional). Default is `tcp`.
1574
1574
1575
+ >[!CAUTION]
1576
+ >
1577
+ >If you do not specify an IP address (such as 127.0.0.1) and it binds to all interfaces then any machine on the same network could
1578
+ >potentially have access to the container. This could be especially dangerous if the container is exposed to the internet.
1579
+
1575
1580
Ports can be either a single value or a range. `HOST` and `CONTAINER` must use equivalent ranges.
1576
1581
1577
1582
You can either specify both ports (`HOST:CONTAINER`), or just the container port. In the latter case,
@@ -1580,6 +1585,8 @@ the container runtime automatically allocates any unassigned port of the host.
1580
1585
` HOST:CONTAINER` should always be specified as a (quoted) string, to avoid conflicts
1581
1586
with [YAML base-60 float](https://yaml.org/type/float.html).
1582
1587
1588
+
1589
+
1583
1590
IPv6 addresses can be enclosed in square brackets.
1584
1591
1585
1592
Examples :
You can’t perform that action at this time.
0 commit comments