We can deploy the docker image from the docker hub to Azure container apps using the below command.
az containerapp up -n $(containerapp-name) -g $(resourcegroup-name) --image $(dockerusername)/$(imagename):latest --environment $(environment-name) --ingress external --target-port 80 --registry-username $(dockerusername) --registry-password $(docker-registry-password) --registry-server hub.docker.com --query properties.configuration.ingress.fqdn
We can set up CICD pipeline in Azure as shown below.
Firstly, create a service for docker as below.

Next, create a pipeline with the docker task and azure cli task as below. It will build the image, push to docker hub and deploy to azure container apps whenever a new commit is available in main branch.
trigger:
- main
pool:
vmImage: ubuntu-latest
variables:
containerapp-name: livingbeingcontainer
resourcegroup-name: rg
dockerusername: jhsdgf
imagename: cimg
environment-name: livingbeingcontainer-env
steps:
- task: Docker@2
displayName: buildAndPush
inputs:
containerRegistry: 'spn-docker-hub-registry'
repository: 'jhsdgf/cimg'
command: 'buildAndPush'
Dockerfile: 'Dockerfile'
tags: |
$(Build.BuildId)
latest
- task: AzureCLI@2
displayName: 'Azure CLI '
inputs:
azureSubscription: 'spn-04-29-23-azure-cxp'
scriptType: 'bash'
scriptLocation: 'inlineScript'
inlineScript: |
az config set extension.use_dynamic_install=yes_without_prompt
az containerapp up -n $(containerapp-name) -g $(resourcegroup-name) --image $(dockerusername)/$(imagename):latest --environment $(environment-name) --ingress external --target-port 80 --registry-username $(dockerusername) --registry-password $(docker-registry-password) --registry-server hub.docker.com --query properties.configuration.ingress.fqdn
Verify the pipeline output onceit completes.

Next browse the azure container app to see changes.
