Allow for setting a custom registry url for DOCKER_MODS
We run a local registry (harbor and quay) and it would be great if we could use these to host mods for internal apps (and for development).
Desired Behavior
Define an environment variables for the base urls related to the registry: AUTH_URL and MANIFEST_URL
Example:
FILENAME="${USERNAME}.${REPO}.${TAG}"
AUTH_URL="${REGISTRY_AUTH_URL:-https://auth.docker.io/token}?service=${REGISTRY_AUTH_SERVICE:-registry.docker.io}&scope=${REGISTRY_AUTH_SCOPE:-repository}:${ENDPOINT}:pull"
MANIFEST_URL="${REGISTRY_URL:-https://registry-1.docker.io/v2}/${ENDPOINT}/manifests/${TAG}"
BLOB_URL="${REGISTRY_URL}/${ENDPOINT}/blobs/"
Edit: I did a little research (hacked the mods script locally) and found that for harbor it acts like docker with 1 exception, the manifest json file matches what ghcr returns.
My "hack" changed the MODE= below the lines above to
[[ $AUTH_URL == *"harbor"* ]] && MODE="ghcr" || MODE="dockerhub"
Current Behavior
No ability to use custom registries
Alternatives Considered
Edit: Here is a gist that has it working for harbor (assumes harbor is in the url for now)
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Any interest in this? I can submit a PR if you want
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue is locked due to inactivity
