Ben Muller
06/20/2023, 1:02 AMdeployments ( old projects )
thingy, we store our docker images in ecr to run on ecs (AWS) and use git storage in github.
I noticed on prefect-aws that the steps required for the build of the prefect.yaml
doesnt have anything yet for a build_docker_image
from ecs.
Am I missing something or can I use a vanilla - prefect_docker.deployments.steps.build_docker_image:
and reference a ecr image and it will handle it?Anthony Head
06/20/2023, 1:07 AMEmil Christensen
06/20/2023, 1:39 PMbuild_docker_image
step should work with any remote image repository, including ECR. In order to do it, you need to:
1. Use the full ECR name in your image name for the build step (e.g. $AWS_ACCOUNT_ID.dkr.ecr.$<http://REGION.amazonaws.com/custom-flow-image|REGION.amazonaws.com/custom-flow-image>
)
2. Use the push_docker_image
step (example here)
3. Be authenticated with ECR… this part is a bit trickier, and depends on how you have auth set up and such. Here’s an end-to-end example that I’m working on incorporating into the docs.
The main mechanic to keep in mind is that it’s all based on the name of the image.