https://prefect.io logo
Title
c

Charlie Henry

08/18/2022, 3:40 PM
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
?
flow.storage = Docker(   
    registry_url="<http://registry.hub.docker.com|registry.hub.docker.com>", 
    image_name="atddocker/atd-microstrategy",
    image_tag=ENV,
)
1
a

Anna Geller

08/18/2022, 3:52 PM
before you start your docker agent, you need to authenticate your terminal with the registry:
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

Charlie Henry

08/18/2022, 4:48 PM
Hey @Anna Geller, I should already be logged into to dockerhub if I can push from my terminal right?
a

Anna Geller

08/18/2022, 4:53 PM
your agent must be able to pull the image
c

Charlie Henry

08/18/2022, 4:58 PM
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

Anna Geller

08/18/2022, 5:32 PM
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

Charlie Henry

08/19/2022, 3:12 PM
@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
flow.storage = Docker(
    registry_url="atddocker",
    image_name="atd-microstrategy"
)
🙌 1
a

Anna Geller

08/19/2022, 3:25 PM
nice work!