MCPcopy Create free account
hub / github.com/FastLED/FastLED / docker_stop_container

Function docker_stop_container

ci/docker_utils/container_db.py:402–420  ·  view source on GitHub ↗

Stop a Docker container. Args: container_id: Container ID to stop Returns: True if successful, False otherwise

(container_id: str)

Source from the content-addressed store, hash-verified

400
401
402def docker_stop_container(container_id: str) -> bool:
403 """Stop a Docker container.
404
405 Args:
406 container_id: Container ID to stop
407
408 Returns:
409 True if successful, False otherwise
410 """
411 try:
412 result = subprocess.run(
413 [get_docker_command(), "stop", container_id],
414 capture_output=True,
415 text=True,
416 timeout=30,
417 )
418 return result.returncode == 0
419 except (FileNotFoundError, subprocess.TimeoutExpired):
420 return False
421
422
423def docker_remove_container(container_id: str) -> bool:

Callers

nothing calls this directly

Calls 2

get_docker_commandFunction · 0.90
runMethod · 0.45

Tested by

no test coverage detected