From 75e3b8bb71253bfa5212415f52417d2e80e0ef49 Mon Sep 17 00:00:00 2001 From: Joffrey F Date: Mon, 24 Aug 2015 16:28:26 -0700 Subject: [PATCH] Update HostConfig docs --- docs/api.md | 2 +- docs/hostconfig.md | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) 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} ```