Skip to content

Commit 2161ee1

Browse files
committed
Docstring fixes for init and init_path
Signed-off-by: Joffrey F <[email protected]>
1 parent 8ea6ecc commit 2161ee1

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

docker/api/container.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -498,6 +498,9 @@ def create_host_config(self, *args, **kwargs):
498498
container, as a mapping of hostname to IP address.
499499
group_add (:py:class:`list`): List of additional group names and/or
500500
IDs that the container process will run as.
501+
init (bool): Run an init inside the container that forwards
502+
signals and reaps processes
503+
init_path (str): Path to the docker-init binary
501504
ipc_mode (str): Set the IPC mode for the container.
502505
isolation (str): Isolation technology to use. Default: `None`.
503506
links (dict or list of tuples): Either a dictionary mapping name

docker/models/containers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ def run(self, image, command=None, stdout=True, stderr=False,
493493
hostname (str): Optional hostname for the container.
494494
init (bool): Run an init inside the container that forwards
495495
signals and reaps processes
496-
init_path (bool): Path to the docker-init binary
496+
init_path (str): Path to the docker-init binary
497497
ipc_mode (str): Set the IPC mode for the container.
498498
isolation (str): Isolation technology to use. Default: `None`.
499499
labels (dict or list): A dictionary of name-value labels (e.g.

docker/types/containers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -423,9 +423,9 @@ def __init__(self, version, binds=None, port_bindings=None,
423423
raise host_config_version_error('init', '1.25')
424424
self['Init'] = init
425425

426-
if init_path:
426+
if init_path is not None:
427427
if version_lt(version, '1.25'):
428-
raise host_config_version_error('init', '1.25')
428+
raise host_config_version_error('init_path', '1.25')
429429
self['InitPath'] = init_path
430430

431431

0 commit comments

Comments
 (0)