Coverage for src/container_collection/docker/terminate_docker_job.py: 100%
3 statements
« prev ^ index » next coverage.py v7.1.0, created at 2024-09-25 18:23 +0000
« prev ^ index » next coverage.py v7.1.0, created at 2024-09-25 18:23 +0000
1from docker import APIClient
4def terminate_docker_job(api_client: APIClient, container_id: str) -> None:
5 """
6 Terminate specific docker container.
8 Parameters
9 ----------
10 api_client
11 Docker API client.
12 container_id
13 ID of container to terminate.
14 """
16 api_client.stop(container=container_id, timeout=1)