hello everyone! any chance that it is possible to ...
# ask-community
f
hello everyone! any chance that it is possible to use the DockerRun run_config with basic auth credentials?
k
Hi @Florentino Bexiga, do you mean you have Flow running and need to authenticate to pull an image from somewhere/
f
yes
locally DockerRun works fine, but now I want to pull the image from somewhere else and I haven't been able to find exactly how
k
You need to log-in on the agent side. Where is your image hosted? AWS?
f
yes
k
How did you authenticate to push the image there?
f
i have a setup with github actions that authenticates on ECR, builds the agent with a custom image, pushes, runs the register to build and push the flow image as well then i run the container for the agent but i get what you are saying, basically the container of the agent should run docker login prior to running the prefect agent, correct?
k
Yeah exactly. This may help you. Look for the credential-helper part
f
i've used this before in this case i was trying to pass credentials as an env var to the agent and make it use them somehow didn't occur to me to just do the docker login beforehand
thanks!
k
ah perfect then!
f
still... prefect agent uses the docker REST API instead of the docker utility if i just do "docker login", the agent won't pick those credentials up will it?
k
I believe it does. Did you push an image yourself or with Prefect
DockerStorage
?
f
DockerStorage
k
Then the push succeeded using the API right? If I’m understanding the question right
f
true, so the pull should too, good point