Important: This small application is designed for a specific use case in mind so
it is very likely that it isn't going to solve your problems. For more information,
read my blog post about this project.
Environment variables
GITHUB_TOKEN: required - a GitHub (personal access) token with read:packages permission
HOST: optional - the proxy address (default: 127.0.0.1)
PORT: optional - the proxy port (default: 10000)
UPSTREAM_URL: optional - the URL of the upstream container registry (default: https://ghcr.io)
GITHUB_PACKAGES_OWNER: optional - the name of a packages owner (GitHub username). Useful to retrieve packages from a user that isn't the user authenticated with the GITHUB_TOKEN
In DSM, create a new container using the willdurand/container-registry-proxy
image available on the Docker Hub. Make sure to define a GITHUB_TOKEN
environment variable with the value generated in the previous step. Also, add
this container to the "host" network.
Next, configure a new registry in DSM > Docker > Registry > Settings, e.g.
GitHub Registry (Proxied) with a dummy URL for now (we'll change it
manually later), e.g. http://nas.local:10000. You must configure a GitHub
username and the password should be the GitHub token generated previously.
SSH into the Synology and open /var/packages/Docker/etc/registry.json using
elevated privileges (i.e. sudo vim). Change nas.local to 127.0.0.1,
save and quit.
At this point, the registry proxy is fully configured. In DSM > Docker >
Registry > Settings, select the newly added registry and click "Use". You
should now see the list of images.