More Fun with Azure Container Apps and Compose Files

Published Jul 11 2022 09:57 AM 1,695 Views
Microsoft

One of the main missing pieces for the Compose spec support in az containerapp compose was support for the build key.

 

With the 0.2.0 release, there is now support for the build key.  The container image build is handled by Azure Container Registry, so you can either provide ACR credentials or a new container registry will be created for you as part of the creation process.  Only context and dockerfile are currently supported.  

 

Example Compose File for a .NET Web Api project:

 

 

 

 

version: '3'
services:
  api:
    build:
      context: ./src
      dockerfile: ./TodoApi/Dockerfile
    ports:
      - 8080:80

 

 

 

 

Example Repository Layout:

 

dotnet_api_project.png

 

Example Command:

 

 

 

cd dotnet_api
az group create --name dotnet_api_example --location eastus
az containerapp compose create \
            --environment dotnetaca \
            --resource-group dotnet_api_example

 

 

 

For More:

 

For more examples of az containerapp compose functionality - check out the examples repository

 

Let us know what else you'd like to see at containerapp-compose@microsoft.com or via GitHub

Co-Authors
Version history
Last update:
‎Jul 11 2022 09:57 AM
Updated by: