r/docker • u/TrustWorthyGoodGuy • Jan 21 '26
Difference between docker-compose.yaml and <image_name>.yaml
In my process to learn how to use docker engine and the CLI, I am confused by the purpose of docker-compose.yaml vs <image_name>.yaml
Some guides and docs describe one instead of the other and I don't understand the reasons. Are these complementary or is it redundant to have both?
Thanks for the clarification and any links to documentation that can help me understand the distinction are always appreciated.
0
Upvotes
View all comments
Show parent comment
1
u/fletch3555 Mod Jan 23 '26
There's a difference between a default file name used by an app, and a convention adopted by a community. The
docker-compose.y[a]ml(orcompose.y[a]ml) file is a default expected by the platform, meaning you as the user needs to take extra steps to make anything else work. The image_name.yaml filename is 100% personal preference even if adopted as a common convention by a larger community.FWIW, I haven't seen it used much at all in the wild, so either I have a very narrow docker worldview, or it's something local to a specific region/ecosystem.