Does prefect still have no way of auto pulling con...
# ask-community
a
Does prefect still have no way of auto pulling container images from ECR when running agents outside of AWS?
We have tried to create a custom docker registry for logging into ecr via the token. Running the block in isolation works. But the agent always fails to authenticate when triggered to run a container with said block
https://github.com/PrefectHQ/prefect/issues/6230 this has been open 1.5 years and no documentation around a way to actually address this
k
we recently added support for providing registry credentials if you're using a docker worker: https://github.com/PrefectHQ/prefect-docker/pull/102
you'd have to switch to a worker, but it's very very similar to using an agent with a docker infra block
a
thanks for the quick reply! I'm unfamiliar with the workers--do they phase out agents?
k
they do!
they're like agents, but provide a default, infra-specific template that you can then override on each deployment if you'd like, eliminating the need for infra blocks
a
I'm not sure this is going to work because the credentials are sourced via a token.... looks like we'd probably need to make a custom worker
k
I believe you can use your token in the password field
a
the token expires after 12 hours
k
ahhh yeah you'd have to update the field in the block each time there's a new token
a
That's why I was getting a new token to login with the DockerContainer block every-time it was going to run--but it was not authenticating when running from the Agent. If i take the same approach with the worker will it be any different?