azureazure-container-registryazure-spring-cloud

Can't deploy docker image based application to Azure Spring Apps


I'am trying to deploy a sprig boot application to Azure Spring Apps based on a image stored in Azure Container Registry using Azure CLI using this commands:

az spring app deploy \
   --resource-group rg-general-processor-test-swedencentral-001 \
   --name sample-application \
   --container-image processorregistry.azurecr.io/test-app:myapp-2 \
   --service demo-spring-service
   --container-registry processorregistry.azurecr.io \
   --registry-password <my-password> |
   --registry-username processorRegistry

However after a couple of minutes it fails printing InternalServerError and that's it


Solution

  • It seems that there might be an issue with the deployment. To gather more information about the error, you can try checking the logs for the application. You can use the following command to view the logs:

    az spring app logs --name <app-name> --service <service-name> --resource-group <resource-group-name>
    

    Please ensure that the Docker image is listening on port 1025 if you are using the Standard plan, or port 8080 for the Enterprise plan. For more information, you can refer to this link.

    When I attempted to run your command in the Azure CLI in the Azure portal, I encountered a failed message with an "internal server error." However, upon checking the status of the app in Azure Spring Apps, it was still in the "updating" state. I then tried running the same command on my local machine and encountered the following issue:

    enter image description here

    To resolve this, I made a slight modification to your command by removing the ACR URL before the image name for the --container-image argument. After making this adjustment, I executed the command, and it worked as expected.

    Here is the modified command:

    az spring app deploy --resource-group <resource-group-name> --name azspringappsvjy-app03 --container-image spring-app:latest --service azspringappsvjy --container-registry acrvjy.azurecr.io --registry-password 000000000000000000000000 --registry-username acrvjy --verbose
    

    Output: https://i.imgur.com/TFIR1op.png