is there an easy way to log into docker hub during...
# ask-community
m
is there an easy way to log into docker hub during the build (not push) step? The docker images we build use
prefecthq/prefect
. but without authenicating to dockerhub, we are getting rate limited.
I would expect the step to use the creds is passed But per this: https://github.com/PrefectHQ/prefect-docker/blob/main/prefect_docker/deployments/steps.py#L184C34-L184C34 it seems that it would only use the credentials if pushing during the build step (which is disabled by default)
k
is this running as part of a CI pipeline? I've handled this before by running
docker login
in the step prior to
prefect deploy
m
yep
k
that way both build and push are already authenticated when they run
m
The build needs to auth to dockerhub. but the push needs to auth against AWS ECR
i assume this would be fine, if i provide aws creds to the push step
k
hmmmmm yeah that makes sense
I haven't tried that exact setup but it's worth a try
m
alright. thanks!