From c0c3cb44973e4376cbd2c187d0287c6505857cca Mon Sep 17 00:00:00 2001 From: Joffrey F Date: Wed, 1 Mar 2017 14:00:05 -0800 Subject: [PATCH] Docstring fixes for init and init_path Signed-off-by: Joffrey F --- docker/api/container.py | 3 +++ docker/models/containers.py | 2 +- docker/types/containers.py | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/docker/api/container.py b/docker/api/container.py index 453e3785..4e7364b6 100644 --- a/docker/api/container.py +++ b/docker/api/container.py @@ -498,6 +498,9 @@ class ContainerApiMixin(object): container, as a mapping of hostname to IP address. group_add (:py:class:`list`): List of additional group names and/or IDs that the container process will run as. + init (bool): Run an init inside the container that forwards + signals and reaps processes + init_path (str): Path to the docker-init binary ipc_mode (str): Set the IPC mode for the container. isolation (str): Isolation technology to use. Default: `None`. links (dict or list of tuples): Either a dictionary mapping name diff --git a/docker/models/containers.py b/docker/models/containers.py index b31c22f6..0d328e72 100644 --- a/docker/models/containers.py +++ b/docker/models/containers.py @@ -493,7 +493,7 @@ class ContainerCollection(Collection): hostname (str): Optional hostname for the container. init (bool): Run an init inside the container that forwards signals and reaps processes - init_path (bool): Path to the docker-init binary + init_path (str): Path to the docker-init binary ipc_mode (str): Set the IPC mode for the container. isolation (str): Isolation technology to use. Default: `None`. labels (dict or list): A dictionary of name-value labels (e.g. diff --git a/docker/types/containers.py b/docker/types/containers.py index 4823d990..5a5079a8 100644 --- a/docker/types/containers.py +++ b/docker/types/containers.py @@ -423,9 +423,9 @@ class HostConfig(dict): raise host_config_version_error('init', '1.25') self['Init'] = init - if init_path: + if init_path is not None: if version_lt(version, '1.25'): - raise host_config_version_error('init', '1.25') + raise host_config_version_error('init_path', '1.25') self['InitPath'] = init_path