Slackbot
05/23/2024, 5:28 AMMarvin
05/23/2024, 5:28 AMprefect.yaml
file, similar to the example below:
yaml
build:
- prefect_docker.deployments.steps.build_docker_image:
id: build_image
requires: prefect-docker>=0.3.0
image_name: your-repo/your-image
tag: latest
dockerfile: auto
push: true
With this configuration, most deployments will use your-repo/your-image:latest
.
Reference: Prefect Docker Examples
2. Override for Specific Deployments:
For specific deployments, override the default Docker image by specifying different build and push steps directly in the deployment configuration.
yaml
deployments:
- name: special-deployment
build:
- prefect_docker.deployments.steps.build_docker_image:
id: build_special_image
requires: prefect-docker
image_name: your-repo/special-image
tag: unique-tag
dockerfile: special.Dockerfile
push: true
This will ensure that special-deployment
uses your-repo/special-image:unique-tag
.
Reference: Prefect Official Documentation
These configurations allow you to have a general image for common tasks while specifying unique images for deployments that require special configurations.
If you encounter issues, some related GitHub issues might help:
- docker storage deployment randomly fails
- Docker-git recipe doesn't get cleaned up
I hope that's abundantly clear.
If you'd like to delve deeper, the full references are here:
- https://prefecthq.github.io/prefect-docker/deployments/steps/
- Prefect Deployment Kubernetes Guide
Not that anyone really cares.