MCPcopy
hub / github.com/astral-sh/python-build-standalone / run_container

Function run_container

pythonbuild/docker.py:115–123  ·  view source on GitHub ↗
(client, image)

Source from the content-addressed store, hash-verified

113
114@contextlib.contextmanager
115def run_container(client, image):
116 container = client.containers.run(
117 image, command=["/bin/sleep", "86400"], detach=True
118 )
119 try:
120 yield container
121 finally:
122 container.stop(timeout=0)
123 container.remove()
124
125
126def container_exec(container, command, user="build", environment=None):

Callers

nothing calls this directly

Calls 1

runMethod · 0.45

Tested by

no test coverage detected