Hi everyone, I'm trying to use Docker Storage with...
# prefect-community
c
Hi everyone, I'm trying to use Docker Storage with our dockerhub account and I keep getting an error that I'm not given permission to push to our account:
InterruptedError: denied: requested access to the resource is denied
. If I
docker push
outside of prefect it'll push no problem. Maybe it's an incorrect
registry_url
?
Copy code
flow.storage = Docker(   
    registry_url="<http://registry.hub.docker.com|registry.hub.docker.com>", 
    image_name="atddocker/atd-microstrategy",
    image_tag=ENV,
)
1
a
before you start your docker agent, you need to authenticate your terminal with the registry:
Copy code
docker login -u xxx -p yyy
btw this gets easier in 2.0 with registry blocks - one reason to consider migration to 2.0
c
Hey @Anna Geller, I should already be logged into to dockerhub if I can push from my terminal right?
a
your agent must be able to pull the image
c
It's a public repo so it should be able to be pulled by anyone. Do I supply an argument with
prefect agent docker start
?
a
oh wow, if this is a public repo, then something is wrong do you want to perhaps start everything from scratch in a new environment and cross-check? this should work. You could open a GitHub issue and share a detailed approach you took there to figure out what's wrong
👍 1
c
@Anna Geller, found out what I was doing wrong, needs to be the account name under
registry_url
and the image name (without account name) under
image_name
for this docker image: https://hub.docker.com/r/atddocker/atd-microstrategy
Copy code
flow.storage = Docker(
    registry_url="atddocker",
    image_name="atd-microstrategy"
)
🙌 1
a
nice work!