Private registry hosted image pulled by "docker pull" but not by "Dockerfile FROM clause"

We host images in private registry.

docker pull $registry_ip:$registry_port/$image:$tag works fine, but Dockerfile FROM $ip:$port/$image:$tag is unable to pull the same image, and produces the following message:

=> ERROR [internal] load metadata for $registry_ip:$registry_port/$image:$tag
[internal] load metadata for $registry_ip:$registry_port/$image:$tag failed to solve with frontend dockerfile.v0: failed to create LLB definition: $registry_ip:$registry_port/$image:$tag: not found

Wondering what might be different when pulling a image, between docker pull vs. Dockerfile FROM clause, and how that could contribute to the previous one being successful while the latter complaining…

Thanks for sharing your thoughts.

nvm, looks like a known issue

https://issues.sonatype.org/browse/NEXUS-12684 and Build images with BuildKit | Docker Documentation

Setting DOCKER_BUILDKIT=0 (disable buildkit) also works.