<@ULVA73B9P> does prefect pull image from source w...
# ask-marvin
a
@Marvin does prefect pull image from source when it does not find in the local docker ?
m
thought for 80.2 seconds
Yes, Prefect will attempt to pull Docker images from a registry when they're not found locally, but the exact behavior depends on how you've configured your deployment. Here's how it works: 1. When using Docker-based infrastructure, Prefect follows Docker's standard pulling behavior: - If the image isn't found locally, it will attempt to pull from the default registry (Docker Hub) or any specified custom registry - If you've specified a custom registry in your image name (e.g., `my-registry.com/image-name`), it will pull from there 2. You can control this behavior through the
DockerImage
configuration when setting up your deployment. For example:
Copy code
python
from prefect.infrastructure import DockerImage

docker_image = DockerImage(
    image="your-image-name:tag",
    # Additional Docker-specific configurations can be provided here
)
3. The pulling behavior integrates with Docker's standard authentication mechanisms, so: - Public images will be pulled automatically - Private images will require appropriate authentication (via Docker login or configured credentials) For the most up-to-date and detailed information about Docker-based deployments, you can refer to the Docker infrastructure documentation. Keep in mind that if you're using custom Dockerfiles with your deployments, Prefect will handle building and managing those images according to your deployment configuration. The pulling behavior for base images used in your Dockerfiles follows the same Docker conventions.