Docker hub credentials on IoT Edge Device

Solved the problem myself, for future reference:
in deployment.template.json, make sure you have the correct URL in “registryCredentials”: https://index.docker.io/v1/
I tried many different shapes and forms of this URL, but this one is the only one that works!
Also don’t forget the username and password in the same section.