mirror of
https://github.com/TrezOne/docker-mods-uptime-kuma-timeout-fix.git
synced 2026-06-18 14:23:07 -04:00
Support images in the root of local registries
This commit is contained in:
+8
-4
@@ -264,13 +264,17 @@ run_mods() {
|
||||
DOCKER_MOD="${DOCKER_MOD#ghcr.io/*}"
|
||||
;;
|
||||
* )
|
||||
if [[ $DOCKER_MOD == */* ]]; then
|
||||
REGISTRY="registry-1.docker.io"
|
||||
MOD="${DOCKER_MOD%/*}"
|
||||
fi
|
||||
# Default assumption is docker.io
|
||||
REGISTRY="registry-1.docker.io"
|
||||
MOD="${DOCKER_MOD%/*}"
|
||||
# If mod still has a / after stripping off the image name it's not docker.io
|
||||
if [[ $MOD == */* ]]; then
|
||||
REGISTRY="${MOD%%/*}"
|
||||
DOCKER_MOD="${DOCKER_MOD#"$REGISTRY"/*}"
|
||||
# If "repo" name has . in it, then assume it's actually a registry with no repo
|
||||
elif [[ ${DOCKER_MOD%%/*} =~ \. ]]; then
|
||||
REGISTRY="${DOCKER_MOD%%/*}"
|
||||
MOD="${DOCKER_MOD##*/}"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
Reference in New Issue
Block a user