docker-compose label constraints


Is there a specific reason the following docker-compose label format is not allowed?

Invalid label name: “[0].main”.
Label names must only contain alphanumeric characters, periods “.” and dashes “-”.

I want to use it to define some settings from our reverse proxy container (traefik).
Now I have to configure these settings with a separate configuration file injected into the container.

Best Regards,


Hi there! This doc : should be able to provide some info on that. Cheers!