Hi Prefect community! We’re using prefect cloud as...
# prefect-community
Hi Prefect community! We’re using prefect cloud as backend, Docker Storage which uses a local Dockerfile and the prefect docker agent which uses the local image created by that local Dockerfile. We’ve created an AWS ECR Repository to store the image and I’d like to use that instead of the local one. I had the impression that I could do that by removing Docker Storage’s
argument and adding a
param, but that doesn’t work and if I keep both params it tries to push the image to the ECR repo which I don’t want. What’s the right setup for this case?
I found a helpful explanation of storage and run config in this thread: https://prefect-community.slack.com/archives/CL09KU1K7/p1612805566470200?thread_ts=1612802267.457300&cid=CL09KU1K7 So going by this logic, it should be possible to set the Storage object’s source to my image hosted on the ECR Repository, correct? Is it that I’m using the wrong Storage class? But DockerStorage seems to be the only one to be able to handle flows inside a Docker container. 🤔
Update on my problem in case anybody else has the same issue! The registry url to pull an image needs to be given by using the
param, and not the
param. E.g:
Copy code
flow.storage = Docker(base_image="<http://some_aws_ecr.amazonaws.com/repo_name:latest|some_aws_ecr.amazonaws.com/repo_name:latest>")
😓 1