#push to secure docker registry

1 messages Β· Page 1 of 1 (latest)

random trench
#

Hello there!
Is there a recommended way of pushing a built image to a secure registry, using the Go SDK please? (func (*Container) Publish)
I am not seeing anything about credentials in the documentation.
(Must I perform a docker login somehow?)

Context :

  • GitHub Action
  • DigitalOcean registry

Thanks a lot!
-- Gaetan

torn seal
#

πŸ‘‹ yes, you need to perform a docker login to your repository and the SDK's will use those credentials when pushing

random trench
#

Thank you for the quick answer πŸ™ (sorry I missed this in the FAQ 😐 )

random trench
#

When trying my workflow locally with the act program, I am getting this.

#

I'll try to run my dagger program directly on my mac (outside of github action and act env)

#

πŸ€” hum, I'll try to perform the docker login command in Go and not using a github action

torn seal
random trench
#

if I use os/exec for docker login I get the exact same error

failed to fetch oauth token: unexpected status: 403 Forbidden
#

yes ... I am now trying outside of act 🀞

random trench
#

same error when running the go program manually while being logged in
BUT, if I push using an image name (repo) that already exists in the registry, then it works fine 😳

#

oh !

denied: registry contains 1 repositories, limit is 1
#

really sorry, it's a limitation by my registry πŸ€¦β€β™‚οΈ

torn seal
#

πŸ˜„

#

it's strange that the CI output says "403" though with "failed to fetch oauth token"

random trench
#

that reassuring in a way πŸ™ƒ

#

agreed, the error message is not helping πŸ˜…

torn seal
#

πŸ‘ let us know if it's indeed the registry limitation or something else

random trench
#

will let you know !
i'm working on it

torn seal
#

have to step out for a bit, pinging @buoyant minnow and @plain lark for visibility πŸ™

random trench
#

thanks. I'll go to bed in a few minutes anyway πŸ›Œ see you tomorrow πŸ‘‹

#

it seems to be working fine, in act as well

#

going to sleep, happy 😊
thanks for the help!

#

will deploy to prod tomorrow

random trench
#

this post can now be closed I think