Skip to content

Commit 50d4757

Browse files
committed
Remove init_path from create
This option was never functional, and was not intended to be added to the "container create" API, so let's remove it, because it has been removed in Docker 17.05, and was broken in versions before that; see - moby/moby#32355 --init-path does not seem to work - moby/moby#32470 remove --init-path from client Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent 5e8b1c0 commit 50d4757

File tree

2 files changed

+0
-14
lines changed

2 files changed

+0
-14
lines changed

docker/api/container.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,6 @@ def create_host_config(self, *args, **kwargs):
487487
IDs that the container process will run as.
488488
init (bool): Run an init inside the container that forwards
489489
signals and reaps processes
490-
init_path (str): Path to the docker-init binary
491490
ipc_mode (str): Set the IPC mode for the container.
492491
isolation (str): Isolation technology to use. Default: ``None``.
493492
links (dict): Mapping of links using the

tests/integration/api_container_test.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -448,19 +448,6 @@ def test_create_with_init(self):
448448
config = self.client.inspect_container(ctnr)
449449
assert config['HostConfig']['Init'] is True
450450

451-
@pytest.mark.xfail(True, reason='init-path removed in 17.05.0')
452-
@requires_api_version('1.25')
453-
def test_create_with_init_path(self):
454-
ctnr = self.client.create_container(
455-
BUSYBOX, 'true',
456-
host_config=self.client.create_host_config(
457-
init_path="/usr/libexec/docker-init"
458-
)
459-
)
460-
self.tmp_containers.append(ctnr['Id'])
461-
config = self.client.inspect_container(ctnr)
462-
assert config['HostConfig']['InitPath'] == "/usr/libexec/docker-init"
463-
464451
@requires_api_version('1.24')
465452
@pytest.mark.xfail(not os.path.exists('/sys/fs/cgroup/cpu.rt_runtime_us'),
466453
reason='CONFIG_RT_GROUP_SCHED isn\'t enabled')

0 commit comments

Comments
 (0)