This example assumes you have previously completed the following examples:
- Create an Azure Resource Group
- Create an Azure Container Registry
- Push a Tomcat Docker image to Azure Container Registry
- Create an Azure Container Apps environment
To deploy the Tomcat container image to Azure Container Apps use the command lines below.
export ACA_TOMCAT=tomcat
az containerapp create \
--name $ACA_TOMCAT \
--resource-group $RESOURCE_GROUP \
--environment $ACA_ENVIRONMENT_NAME \
--image $ACR_NAME.azurecr.io/$ACR_TOMCAT_IMAGE \
--target-port 8080 \
--ingress 'external' \
--registry-server $ACR_NAME.azurecr.io \
--min-replicas 1
az containerapp show \
--resource-group $RESOURCE_GROUP \
--name $ACA_TOMCAT \
--query properties.configuration.ingress.fqdn
Then open your browser to the URL echoed above and you should see:
And this is served by a custom Tomcat using a Docker image coming from
our own Azure Container Registry.
Do NOT forget to remove the resources once you are done running the example.
1m