Update HostConfig docs

This commit is contained in:
Joffrey F 2015-08-24 16:28:26 -07:00
parent 595965ebc4
commit 75e3b8bb71
2 changed files with 5 additions and 4 deletions

View File

@ -234,7 +234,7 @@ from. Optionally a single string joining container id's with commas
'Warnings': None}
```
### parse_env_file
### docker.utils.parse_env_file
A utility for parsing an environment file.

View File

@ -6,7 +6,7 @@ The Docker Remote API introduced [support for HostConfig in version 1.15](http:/
## HostConfig helper
### docker.utils.create_host_config
### Client.create_host_config
Creates a HostConfig dictionary to be used with `Client.create_container`.
@ -97,7 +97,8 @@ for example:
**Returns** (dict) HostConfig dictionary
```python
>>> from docker.utils import create_host_config
>>> create_host_config(privileged=True, cap_drop=['MKNOD'], volumes_from=['nostalgic_newton'])
>>> from docker import Client
>>> c = Client()
>>> c.create_host_config(privileged=True, cap_drop=['MKNOD'], volumes_from=['nostalgic_newton'])
{'CapDrop': ['MKNOD'], 'LxcConf': None, 'Privileged': True, 'VolumesFrom': ['nostalgic_newton'], 'PublishAllPorts': False}
```