Skip to content

Commit 75e3b8b

Browse files
committed
Update HostConfig docs
1 parent 595965e commit 75e3b8b

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

docs/api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ from. Optionally a single string joining container id's with commas
234234
'Warnings': None}
235235
```
236236

237-
### parse_env_file
237+
### docker.utils.parse_env_file
238238

239239
A utility for parsing an environment file.
240240

docs/hostconfig.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ The Docker Remote API introduced [support for HostConfig in version 1.15](http:/
66

77
## HostConfig helper
88

9-
### docker.utils.create_host_config
9+
### Client.create_host_config
1010

1111
Creates a HostConfig dictionary to be used with `Client.create_container`.
1212

@@ -97,7 +97,8 @@ for example:
9797
**Returns** (dict) HostConfig dictionary
9898

9999
```python
100-
>>> from docker.utils import create_host_config
101-
>>> create_host_config(privileged=True, cap_drop=['MKNOD'], volumes_from=['nostalgic_newton'])
100+
>>> from docker import Client
101+
>>> c = Client()
102+
>>> c.create_host_config(privileged=True, cap_drop=['MKNOD'], volumes_from=['nostalgic_newton'])
102103
{'CapDrop': ['MKNOD'], 'LxcConf': None, 'Privileged': True, 'VolumesFrom': ['nostalgic_newton'], 'PublishAllPorts': False}
103104
```

0 commit comments

Comments
 (0)