Support for optional containers configuration section for container based service targ
- Dominant language
- Go
- Stars
- 569
- Forks
- 364
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 136
Description
## Proposal
Within a ContainerApp service configuration enable an optional containers section where the following configuration options are available.
Ability to specify pre-built / public container images
Ability to specify relative path to code to build each image
Ability to specify any custom docker build options for each container
If the containers element is not defined azd will continue to use the single container approach in use today.
## Example
Multiple containers can now be set within the container app configuration. Containers can be given a name, relative path to the code project and docker configuration options.
The following example will create a container app with 2 images; a sidecar and main image each referencing different code projects. Users can mix an match a combination of code based projects and pre-existing / public image references.
> [!NOTE]
> When using multiple containers, the project and language are not required at the root configuration
```yaml
# azure.yaml
name: my-project
metadata:
template: my-project@0.0.1-beta
services:
api:
host: containerapp
containers:
- name: sidecar
project: ./src/sidecar
language: js
docker:
path: ./Dockerfile
context: .
platform: amd64
- name: main
project: ./src/api
language: js
docker:
path: ./Dockerfile
context: .
platform: amd64
```
Contributor guide
Assessment
This issue has not been assessed yet.