What are the best practices for managing Docker im...
# prefect-community
j
What are the best practices for managing Docker image names?
Copy code
docker_storage = Docker(
    registry_url=environ["REGISTRY_URL"],
    dockerfile="./Dockerfile",
    image_name="{edited}-prod-platform-prefect-{project}",
    image_tag="latest",
)
It seems like each flow could demand its own image in order to separate dependencies, which would mean creating an ECR repo for each workflow? I suppose this wouldn't be that difficult to script with Github Actions and aws-cli globbing a directory for workflow names?
k
You can have multiple Flows in the same container, but a couple of links. Check this, and more importantly, this. But also, I think the best practice is fixed name but versioned tag, though I understand if that gets tricky in CI/CD
m
We’re using a single “mega-container” that contains all of our flows individual dependencies, which lives inside of a single ECR repo. The container has scripts for different entrypoint/commands for each Task.
upvote 1
j
Yeah, it seems like any benefit of small containers with individual sets of dependencies won't be realized for a while given our small ETL setup right now. So Myles' setup probably makes sense for now.
k
Also worth a read
👀 1
upvote 1