MCPcopy
hub / github.com/freedomofpress/dangerzone / container_pull

Function container_pull

dangerzone/container_utils.py:378–384  ·  view source on GitHub ↗

Pull a container image from a registry.

(image: str, manifest_digest: str)

Source from the content-addressed store, hash-verified

376
377
378def container_pull(image: str, manifest_digest: str) -> None:
379 """Pull a container image from a registry."""
380 podman = init_podman_command()
381 try:
382 podman.run(["pull", f"{image}@sha256:{manifest_digest}"], capture_output=False)
383 except CommandError:
384 raise errors.ContainerPullException("Could not pull the container image")
385
386
387def get_local_image_digest(image: str | None = None) -> str:

Callers

nothing calls this directly

Calls 2

init_podman_commandFunction · 0.85
runMethod · 0.45

Tested by

no test coverage detected