mirror of
https://github.com/TrezOne/docker-mods-uptime-kuma-timeout-fix.git
synced 2026-07-18 08:48:27 -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/*}"
|
DOCKER_MOD="${DOCKER_MOD#ghcr.io/*}"
|
||||||
;;
|
;;
|
||||||
* )
|
* )
|
||||||
if [[ $DOCKER_MOD == */* ]]; then
|
# Default assumption is docker.io
|
||||||
REGISTRY="registry-1.docker.io"
|
REGISTRY="registry-1.docker.io"
|
||||||
MOD="${DOCKER_MOD%/*}"
|
MOD="${DOCKER_MOD%/*}"
|
||||||
fi
|
# If mod still has a / after stripping off the image name it's not docker.io
|
||||||
if [[ $MOD == */* ]]; then
|
if [[ $MOD == */* ]]; then
|
||||||
REGISTRY="${MOD%%/*}"
|
REGISTRY="${MOD%%/*}"
|
||||||
DOCKER_MOD="${DOCKER_MOD#"$REGISTRY"/*}"
|
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
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|||||||
Reference in New Issue
Block a user