Don’t Repeat Yourself with Anchors, Aliases and Extensions in Docker Compose Files Docker Compose files are a great way to define multiple containers and services that work together as a stack. But, it can be easy to end up with repeated blocks in stacks with lots of similar services or configurations. Don’t Repeat Yourself (DRY) by leveraging YAML aliases and anchors, and the upcoming extension f