Krystian
03/17/2025, 4:10 PMMarvin
03/17/2025, 4:10 PMDockerImage
class to specify the path to your Dockerfile. This allows you to customize the image as needed.
- Ensure that the image is accessible in your deployment's execution environment. If the image is already built and hosted in your private Harbor repository, you can skip the build step by setting build=False
in the deployment method.
3. Deployment with Docker Worker:
- Use the prefect-docker
package to execute flow runs within Docker containers. Ensure this package is installed in your environment.
- Create your deployment using the DockerImage
class, and configure it to pull the image from your Harbor repository.
4. Reference and Execution:
- In your deployment script or prefect.yaml
file, reference the Docker image and the credential Secret block. This ensures the worker can authenticate and pull the image when executing the flow.
For more details, you can refer to the following Prefect documentation links:
- Docker Worker Deployment
- Using Prefect Secrets for Credentials
This approach leverages Prefect's infrastructure capabilities to manage and execute your flow deployments efficiently.