My deployment suddenly stopped working. It was fine for multiple months but now suddenly fails to pull the image from my private dockerhub registry
I'm getting the following error
{
"code": "DeploymentFailed",
"message": "At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.",
"details": [
{
"code": "InaccessibleImage",
"message": "The image 'consolidatesoftware/kowalski:a3f38b6be70573d7aa67e84a343be249f0009335' in container group 'consolidate-staging' is not accessible. Please check the image and registry credential."
}
]
}
My template sepcifies the ImageRegistryCredentials correctly and pulling the image with those credentials from the commandline works perfectly
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"name": {
"defaultValue": "consolidate",
"type": "string"
},
"container-image": {
"defaultValue": "consolidatesoftware/kowalski:latest",
"type": "string"
},
"dockerhub-username": {
"type": "securestring"
},
"dockerhub-password": {
"type": "securestring"
}
},
"variables": {
"location": "[resourceGroup().location]"
},
"resources": [
{
"type": "Microsoft.ContainerInstance/containerGroups",
"apiVersion": "2021-10-01",
"name": "[parameters('name')]",
"location": "[variables('location')]",
"properties": {
"sku": "Standard",
"containers": [
{
"name": "[parameters('name')]",
"properties": {
"image": "[parameters('container-image')]",
"resources": {
"requests": {
"memoryInGB": 1.5,
"cpu": 1
}
}
}
}
],
"imageRegistryCredentials": [
{
"server": "index.docker.io",
"username": "[parameters('dockerhub-username')]",
"password": "[parameters('dockerhub-password')]"
}
],
"restartPolicy": "OnFailure",
"osType": "Linux"
}
}
],
"outputs": {
"hostname": {
"type": "string",
"value": "[reference(resourceId('Microsoft.ContainerInstance/containerGroups', parameters('name'))).ipAddress.fqdn]"
}
}
}