Skip to content

Commit 498b09e

Browse files
committed
Extend doc string for port mapping function
1 parent 7cb4555 commit 498b09e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

repo2docker/utils.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,15 +70,16 @@ def chdir(path):
7070

7171
def validate_and_generate_port_mapping(port_mappings):
7272
"""
73-
Validate a list of port mappings and return a dictionary of port mappings
73+
Validate a list of port mappings and return a dictionary of port mappings.
7474
7575
Args:
7676
port_mappings (list): List of strings of format
7777
`'host_port:container_port'` with optional tcp udp values and host
7878
network interface
7979
8080
Returns:
81-
Dictionary of port mappings
81+
Dictionary of port mappings in the format accepted by docker-py's
82+
`containers.run()` method (https://docker-py.readthedocs.io/en/stable/containers.html)
8283
8384
Raises:
8485
Exception on invalid port mapping

0 commit comments

Comments
 (0)