diff --git a/docs/api.md b/docs/api.md index b9b29c5a..90acd4a3 100644 --- a/docs/api.md +++ b/docs/api.md @@ -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. diff --git a/docs/hostconfig.md b/docs/hostconfig.md index c2a4edae..e21148b1 100644 --- a/docs/hostconfig.md +++ b/docs/hostconfig.md @@ -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} ```