'configure Azure ContainerInstance to use self hosted registry

I'm currently testing Azure and i tried to deploy my own docker image. The image is hosted on a registry on my VServer. The registry is using port 5000. When I try to provide the .yaml file with proper imageRegistryCredentials it fails.

Image registry credentials:
- server: my.server.com:5000
  username: me
  password: abc123

az container create -g My group --file myconainer.yaml returns:

The server 'my.server.com:5000' in the 'imageRegistryCredentials' of container group 'MyContainerGroup' is Invalid. 
It should be a valid hostname without protocol.

And if I do not provide a port I can not login to the registry. What am I doing wrong?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source