4

from ACA docs we have to specify target port of the container

az containerapp create \
  --name my-container-app \
  --resource-group $RESOURCE_GROUP \
  --environment $CONTAINERAPPS_ENVIRONMENT \
  --image mcr.microsoft.com/azuredocs/containerapps-helloworld:latest \
  --target-port 80 \
  --ingress 'external' \
  --query configuration.ingress.fqdn

Now my question is how to deploy via docker-compose not just a single image, since there is a single target-port?

Yefet
  • 2,010
  • 1
  • 10
  • 19
  • did you find a solution yet to add multiple docker images in the containerApp pod? – Joel Harkes May 23 '22 at 09:31
  • 1
    @JoelHarkes I switched to ACI – Yefet May 23 '22 at 09:43
  • Nice to know, thanks! im looking into it myself. – Joel Harkes May 24 '22 at 12:12
  • @Yefet, I know this is long after you deployed it, but doesn't ACI limit you to a single container image? How are you using it to deploy multiple images that work together similarly to docker-compose? EDIT: I stand corrected. Microsoft has a tutorial showing how to deploy a docker-compose solution seamlessly into ACI: https://learn.microsoft.com/en-us/azure/container-instances/tutorial-docker-compose – RonaldB Jun 01 '23 at 16:09
  • @RonaldB Correct! I used that turo as a reference – Yefet Jun 05 '23 at 13:17

2 Answers2

3

If you want to deploy multiple containers to a single container app, you can define more than one container in the configuration's containers array

Reference: Containers in Azure Container Apps Preview | Microsoft Docs

Alternative

If you want to deploy your application via Docker Compose, you can deploy to Azure Web app

While creating the web app, select publish as Docker Container. Under Docker, select options as Docker Compose and provide the Docker Compose file

enter image description here

Joel Harkes
  • 10,975
  • 3
  • 46
  • 65
RamaraoAdapa
  • 2,837
  • 2
  • 5
  • 11
3

To deploy with docker-compose, you can use this command: https://learn.microsoft.com/en-us/cli/azure/containerapp/compose

az containerapp compose create --environment
                               --resource-group
                               [--compose-file-path]
                               [--location]
                               [--registry-password]
                               [--registry-server]
                               [--registry-username]
                               [--tags]
                               [--transport]
                               [--transport-mapping]