Fix correct image

This commit is contained in:
Shiming Zhang
2024-06-22 23:34:52 +08:00
parent 5c3c861f00
commit 51d3c2b42b

View File

@@ -10,10 +10,10 @@ function guess_image() {
return
fi
if [[ "${image}" == *"registry.docker.com/r"* ]]; then
if [[ "${image}" == *"registry.hub.docker.com/r/"* ]]; then
image="docker.io/${image##*registry.hub.docker.com\/r\/}"
fi
if [[ "${image}" == *"hub.docker.com/r"* ]]; then
if [[ "${image}" == *"hub.docker.com/r/"* ]]; then
image="docker.io/${image##*hub.docker.com\/r\/}"
fi
if [[ "${image%%/*}" != *"."* ]] || [[ "${image}" != *"/"* ]]; then