Docker: Host rules in seperate file?

Is it possible to manage hundreds of host rules for a container in a seperate file?
I dont want to write hundreds of domains in my docker-compose.yml as labels.

The amount of domains often changeing.

Thanks for your help.

What are you trying to solve? If it's the disk space, it will take about the same space in docker-compose as anywhere else. You can use File Provider but since that does not have access to docker discovery Docker provider has, you will need to figure out how to address your docker containers from that file.