mirror of https://github.com/docker/docker-py.git
Update HostConfig docs
This commit is contained in:
parent
595965ebc4
commit
75e3b8bb71
|
|
@ -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.
|
||||
|
||||
|
|
|
|||
|
|
@ -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}
|
||||
```
|
||||
|
|
|
|||
Loading…
Reference in New Issue