Create a networking config dictionary to be used as the ``networking_config`` parameter in :py:meth:`create_container`. Args: endpoints_config (dict): A dictionary mapping network names to endpoint configurations generated by :py:
(self, *args, **kwargs)
| 617 | return HostConfig(*args, **kwargs) |
| 618 | |
| 619 | def create_networking_config(self, *args, **kwargs): |
| 620 | """ |
| 621 | Create a networking config dictionary to be used as the |
| 622 | ``networking_config`` parameter in :py:meth:`create_container`. |
| 623 | |
| 624 | Args: |
| 625 | endpoints_config (dict): A dictionary mapping network names to |
| 626 | endpoint configurations generated by |
| 627 | :py:meth:`create_endpoint_config`. |
| 628 | |
| 629 | Returns: |
| 630 | (dict) A networking config. |
| 631 | |
| 632 | Example: |
| 633 | |
| 634 | >>> client.api.create_network('network1') |
| 635 | >>> networking_config = client.api.create_networking_config({ |
| 636 | 'network1': client.api.create_endpoint_config() |
| 637 | }) |
| 638 | >>> container = client.api.create_container( |
| 639 | img, command, networking_config=networking_config |
| 640 | ) |
| 641 | |
| 642 | """ |
| 643 | return NetworkingConfig(*args, **kwargs) |
| 644 | |
| 645 | def create_endpoint_config(self, *args, **kwargs): |
| 646 | """ |