and upon each flow run it would use that Dockerfile to build the container and then run the tasks within. That is a pretty expensive process so we had switched to having docker-compose build an image and then create tasks to run the built image. I would like to see a way of building the container once and having tasks contained within the container orchestrated by Prefect.
with Flow(name="integration", #schedule=schedule, #state_handlers=[slack_notifier], storage = Docker(dockerfile="/home/lookup/integration/Dockerfile", )) as flow:
run config for your flow that uses the Docker image with all your shared tasks installed.
storage (for example) •
• Register your flow (build time just has to push to S3) When you run your flow it will run in your docker container and pull the required flow information from S3
flow.run_config = DockerRun( -> point to the docker image you build with shared tasks)