docker-baseimage-alpine icon indicating copy to clipboard operation
docker-baseimage-alpine copied to clipboard

Allow for setting a custom registry url for DOCKER_MODS

Open ravensorb opened this issue 3 years ago • 4 comments

linuxserver.io

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)

ravensorb avatar Jan 28 '22 11:01 ravensorb

Thanks for opening your first issue here! Be sure to follow the bug or feature issue templates!

github-actions[bot] avatar Jan 28 '22 11:01 github-actions[bot]

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.

github-actions[bot] avatar Mar 02 '22 02:03 github-actions[bot]

Any interest in this? I can submit a PR if you want

ravensorb avatar Mar 02 '22 02:03 ravensorb

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.

github-actions[bot] avatar Apr 02 '22 02:04 github-actions[bot]

This issue is locked due to inactivity

github-actions[bot] avatar May 03 '23 11:05 github-actions[bot]