prefect.docker.docker_image
Classes
DockerImage
Configuration used to build and push a Docker image for a deployment.
Attributes:
name: The name of the Docker image to build, including the registry and repository.tag: The tag to apply to the built image.dockerfile: The path to the Dockerfile to use for building the image. If not provided, a default Dockerfile will be generated.stream_progress_to: A stream to write build and push progress output to. Defaults to sys.stdout. Set to None to suppress output.build_backend: The backend to use for building images."docker-py"(default) uses the docker-py library."buildx"uses python-on-whales for BuildKit/buildx support, enabling features like build secrets, SSH forwarding, and multi-platform builds.**build_kwargs: Additional keyword arguments to pass to the Docker build request. Whenbuild_backend="docker-py", these are forwarded to docker-py’sclient.api.build(). Whenbuild_backend="buildx", these are forwarded topython_on_whales.docker.buildx.build()and may includesecrets,ssh,cache_from,cache_to,platforms, andpush.