Example:
services:
foo-[for each item in examples]:
image: alpine
entrypoint:
- cd ${item}
- ls -a
It can loop through a directory files or through a file lines.
It automatically adds the variable item or whatever it is called (for each name in names.txt)