So I'm trying to deploy a composed set of images, (one is local and is being built the other is being pulled in from a container registry I control) to a docker container instance on Azure.
I login to azure with docker, set the container group as my context then run
docker compose --env-file ./config/compose/.env.local up
My docker compose file looks like this
# version: "3.9" # optional since v1.27.0
services:
consumer:
build:
context: .
args:
PORTS: 2222 8080 9229
ENVNAME: $ENVNAME
BASEIMAGE: $BASEIMAGE
ports:
- "8080:8080"
image: th3docker.azurecr.io/<imagename>
producer:
image: th3docker.azurecr.io/<imagename>:latest
ports:
- "5001:5001"
container_name: jobmanager
environment:
- ASPNETCORE_ENVIRONMENT=$ASPNET_ENV
depends_on:
- consumer
Looking at the docker documentation, labels
seem to be a field of its own under each service, but I don't have any in this file. I've tried removing container names, and as much as I can from this file but I just don't understand why I'm getting this error.
I took a look at the docker compose source code and this seems to be the offending if statement in the source line 91.
for _, s := range project.Services {
service := serviceConfigAciHelper(s)
containerDefinition, err := service.getAciContainer()
...
if service.Labels != nil && len(service.Labels) > 0 {
return containerinstance.ContainerGroup{}, errors.New("ACI integration does not support labels in compose applications")
}
...
}
Still seems like I am not defining any labels unless some other field is implicitly being consumed as a label. Any idea what's going on here or alternate path to get around this issue would be appreciated.