MrMaxM
MrMaxM

Reputation: 161

Adding ghcr (Github Docker Regustry) to Synology docker results in "Registry returned bad result"

When trying to add the Github Registry to Synology Docker, I always get a prompt saying "Registry returned bad result".

The URL I try to connect to is: https://ghcr.io

Upvotes: 16

Views: 11027

Answers (3)

zorancz
zorancz

Reputation: 159

Here is my workaround to manually update images from ghcr.io from Container Manager UI only. Enabling SSH/using CLI or registering ghcr.io. is not necessary.

  • in DSM, open Container Manager - Project and select your project
  • from "Action" button select "Clean"
  • Switch to "Image" section and delete the images used by your project
  • Go back to Project section, select your project and click "Build" (donwloads up-to-date images and starts the project)

I realize this does not answer the original question (registering the ghcr.io repo), but may help with the underlying problem - updating the projects, without the need for ssh/CLI.

Upvotes: -1

Code Commander
Code Commander

Reputation: 17300

As an addendum to what Peter mentioned. You can workaround this issue by enabling SSH Terminal on your NAS, logging in and then running these commands:

  1. You can either run docker as sudo or add your user to the docker group and allow that group access to the /var/run/docker.sock. (In my case this didn't work for some reason, so I just used sudo.) Make sure to log out and back in for the permissions to take effect.

  2. Then pull the image you want from ghcr.io. In my case this command was:

docker pull ghcr.io/home-assistant-libs/python-matter-server:5.5.3

  1. Afterward, you will see the image in the GUI of Container Manager.

Upvotes: 5

Peter
Peter

Reputation: 168

I'm trying to do the same (DS920+, DSM 7.1 latest). According to this Reddit:

https://www.reddit.com/r/portainer/comments/u1vf1s/how_to_add_ghcr_as_a_registry/

it used to work with 'docker.pkg.github.com' as the repo url, but according to the current Github docs, it was the old namespace and the actual repo is now 'https://ghcr.io'

https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry

According to the docs, authentication is implied many times, maybe it is not possible to use the repo w/o authentication (tried with access tokens, not working).

I opened a Synology support ticket, let's see what they can say.

2022-10-27 - Synology Support replied and the official statement is that the token authentication currently used by Github Container Registry is not supported on the DSM's Docker package GUI. Its possible to ssh to the DSM and use docker from the command line.

Upvotes: 17

Related Questions