Hi folks, I've created a flow that uses Docker Sto...
# ask-community
h
Hi folks, I've created a flow that uses Docker Storage, and an ECS run config. The run config has a task definition defined locally in a YAML file. I am using Prefect Cloud as my backend. The flow registers ok but when I attempt to run it the task definition cannot be registered because I have not specified a image to the ECS Run Config. However in the API reference it says: • `image (str, optional)`: The image to use for this task. If not provided, will be either inferred from the flow's storage (if using 
Docker
 storage), or use the default configured on the agent. and I am using Docker Storage, which has worked in the past and does get stored in my image repository (ECR). It seems as though the specfiying an explicit task definition, either through the
task_definition_path
or
task_definition
arguments and using Docker Storage does not work, or there is a bug in the image being picked up from Storage. Any guidance would be welcome.
j
Hmmm, the
image
field is always specified by the agent when registering a task definition, I don't see how that could be skipped. Can you provide the error message & traceback you get?
h
Sure! This is all I get from the Cloud UI logs
j
Hmmm.
Ah, we require the container used to run prefect be named
flow
, if you named your container differently the agent will add a new container named
flow
, leaving your original container without an image specified.
Part of my todo for today is to better document this (this came up yesterday as well).
h
Ah ok! Yes I've just changed the name of the container to be
flow
and that appears to have overcome that issue. Now I'm getting an issue telling me my task definition does not support FARGATE, my launch type on ECS. But I suspect this is a configurational issue on the ECS end that I can resolve after reading through some docs.
Thank you!