@@ -473,9 +473,11 @@ def create_host_config(self, *args, **kwargs):
473
473
signals and reaps processes
474
474
init_path (str): Path to the docker-init binary
475
475
ipc_mode (str): Set the IPC mode for the container.
476
- isolation (str): Isolation technology to use. Default: `None`.
477
- links (dict or list of tuples): Either a dictionary mapping name
478
- to alias or as a list of ``(name, alias)`` tuples.
476
+ isolation (str): Isolation technology to use. Default: ``None``.
477
+ links (dict): Mapping of links using the
478
+ ``{'container': 'alias'}`` format. The alias is optional.
479
+ Containers declared in this dict will be linked to the new
480
+ container using the provided alias. Default: ``None``.
479
481
log_config (LogConfig): Logging configuration
480
482
lxc_conf (dict): LXC config.
481
483
mem_limit (float or str): Memory limit. Accepts float values
@@ -605,9 +607,10 @@ def create_endpoint_config(self, *args, **kwargs):
605
607
aliases (:py:class:`list`): A list of aliases for this endpoint.
606
608
Names in that list can be used within the network to reach the
607
609
container. Defaults to ``None``.
608
- links (:py:class:`list`): A list of links for this endpoint.
609
- Containers declared in this list will be linked to this
610
- container. Defaults to ``None``.
610
+ links (dict): Mapping of links for this endpoint using the
611
+ ``{'container': 'alias'}`` format. The alias is optional.
612
+ Containers declared in this dict will be linked to this
613
+ container using the provided alias. Defaults to ``None``.
611
614
ipv4_address (str): The IP address of this container on the
612
615
network, using the IPv4 protocol. Defaults to ``None``.
613
616
ipv6_address (str): The IP address of this container on the
@@ -622,7 +625,7 @@ def create_endpoint_config(self, *args, **kwargs):
622
625
623
626
>>> endpoint_config = client.create_endpoint_config(
624
627
aliases=['web', 'app'],
625
- links=[ 'app_db'] ,
628
+ links={ 'app_db': 'db', 'another': None} ,
626
629
ipv4_address='132.65.0.123'
627
630
)
628
631
0 commit comments