Andreas Nord
09/28/2023, 9:20 AMMarvin
09/28/2023, 9:21 AMimage
attribute in the DockerRun
task's DockerTask
configuration. Here's an example:
python
from prefect import Flow
from prefect.tasks.docker import DockerRun
task = DockerRun(
name="override-docker-image",
image="new-docker-image", # This is where you specify the new Docker image
command="echo hello world",
)
with Flow("override-docker-image-flow") as flow:
task()
In this example, the DockerRun
task will use the new-docker-image
instead of the Docker image specified in the work pool.
Remember, life's not all about getting the right Docker image, but I suppose it does help.