Dokploy / dokploy

Open Source Alternative to Vercel, Netlify and Heroku.
https://dokploy.com/
Other
9.31k stars 459 forks source link

Setting up Registry with ghcr.io #699

Closed sebastianarena closed 8 hours ago

sebastianarena commented 1 week ago

To Reproduce

I'm having trouble setting up the registry to use ghcr.io using my username and a token (classic) that I created for this specific purpose

  1. If I set it up like this:

registry-1

I will get the following error

registry-2

Is it trying to upload to docker.io even though I configured something else?

  1. Also if I try to put my Github Org Name as an image prefix, it will try to use that as the actual registry URL (I blurred my org name in the pictures)

registry-3

registry-4

Thanks for this amazing product

Current vs. Expected behavior

The image is uploaded to ghcr.io

Provide environment information

Operating System: Ubuntu 24.04 LTS
Dokploy: 0.10.10
VPS: Hetzner

Which area(s) are affected? (Select all that apply)

Installation, Docker

Additional context

No response

Siumauricio commented 1 week ago

It seems that the dns resolution was modified on the server for some reason.

https://github.com/docker/for-mac/issues/1317

Recently I added steps for add ghcr account however I didn't have any issues, I will check but it seems like is more a dns error from the host

https://docs.dokploy.com/docs/core/registry/ghcr

sebastianarena commented 1 week ago

@Siumauricio thanks for the reply

I can't seem to make it work no matter what I do.

Here's an abstract of what it says when trying to upload it

📦 [Enabled Registry] Uploading image to cloud | <redacted>:latest | https://ghcr.io
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
WARNING! Your password will be stored unencrypted in /root/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credential-stores

Login Succeeded
The push refers to repository [docker.io/library/<redacted>]
a2058383e5e0: Preparing
2a28034070b4: Preparing
d129a0daa9ce: Preparing
172e602b0dc5: Preparing
14c33253c409: Preparing
58b2036d19a8: Preparing
e5174df11535: Preparing
75654b8eeebd: Preparing
e5174df11535: Waiting
75654b8eeebd: Waiting
58b2036d19a8: Waiting
denied: requested access to the resource is denied
Error ❌
denied: requested access to the resource is denied

As you can see, it says Login Successful, even testing like your docs says, shows a success, but later it fails.

I don't know why it says docker.io when it should be ghcr.io? or maybe that is correct because its just the name of the image?

Adding a prefix changes the path from /library/ to /prefix/ I don't think it's DNS otherwise it would fail login as well And the curious thing I noticed was that if I used my Github ORG name as a prefix (assuming it would upload the packages to my org not my username) shows the DNS error, like it's confusing which API to use if the Prefix = ORG name, which is weird.

Don't know what else to try. Let me know if this helps. Thanks.

ouestlabs commented 6 days ago

@Siumauricio thanks for the reply

I can't seem to make it work no matter what I do.

Here's an abstract of what it says when trying to upload it

📦 [Enabled Registry] Uploading image to cloud | <redacted>:latest | https://ghcr.io
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
WARNING! Your password will be stored unencrypted in /root/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credential-stores

Login Succeeded
The push refers to repository [docker.io/library/<redacted>]
a2058383e5e0: Preparing
2a28034070b4: Preparing
d129a0daa9ce: Preparing
172e602b0dc5: Preparing
14c33253c409: Preparing
58b2036d19a8: Preparing
e5174df11535: Preparing
75654b8eeebd: Preparing
e5174df11535: Waiting
75654b8eeebd: Waiting
58b2036d19a8: Waiting
denied: requested access to the resource is denied
Error ❌
denied: requested access to the resource is denied

As you can see, it says Login Successful, even testing like your docs says, shows a success, but later it fails.

I don't know why it says docker.io when it should be ghcr.io? or maybe that is correct because its just the name of the image?

Adding a prefix changes the path from /library/ to /prefix/ I don't think it's DNS otherwise it would fail login as well And the curious thing I noticed was that if I used my Github ORG name as a prefix (assuming it would upload the packages to my org not my username) shows the DNS error, like it's confusing which API to use if the Prefix = ORG name, which is weird.

Don't know what else to try. Let me know if this helps. Thanks.

try to remove the protocol in the url, it should look like : ghcr.io/your_image

Siumauricio commented 6 days ago

@ouestlabs Good catch, very probably is because they are using https at the start of the registry url

Siumauricio commented 8 hours ago

Feel free to reopen if you still have the same issue after using the exact same guide we have in docs