I thinks it is possible to create the azure container by using imageRegistryCredentials
property, you could refer to the sample template.
{
"name": "string",
"type": "Microsoft.ContainerInstance/containerGroups",
"apiVersion": "2018-04-01",
"location": "string",
"tags": {},
"properties": {
"containers": [
{
"name": "string",
"properties": {
"image": "string",
"command": [
"string"
],
"ports": [
{
"protocol": "string",
"port": "integer"
}
],
"environmentVariables": [
{
"name": "string",
"value": "string"
}
],
"resources": {
"requests": {
"memoryInGB": "number",
"cpu": "number"
},
"limits": {
"memoryInGB": "number",
"cpu": "number"
}
},
"volumeMounts": [
{
"name": "string",
"mountPath": "string",
"readOnly": boolean
}
]
}
}
],
"imageRegistryCredentials": [
{
"server": "string",
"username": "string",
"password": "string"
}
],
"restartPolicy": "string",
"ipAddress": {
"ports": [
{
"protocol": "string",
"port": "integer"
}
],
"type": "Public",
"ip": "string",
"dnsNameLabel": "string"
},
"osType": "string",
"volumes": [
{
"name": "string",
"azureFile": {
"shareName": "string",
"readOnly": boolean,
"storageAccountName": "string",
"storageAccountKey": "string"
},
"emptyDir": {},
"secret": {},
"gitRepo": {
"directory": "string",
"repository": "string",
"revision": "string"
}
}
]
}
}
For more details, you could refer to this link.
If the image is public, the password is not required.