O'Reilly logo

Docker Orchestration by Randall Smith

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Extending compose files

We have already talked about using environment files to change your application's behavior. Another way that you can do that is to use multiple Docker Compose files. Each file builds on the previous one, extending it and possibly overriding options. This can give you great flexibility in developing your application or adjusting it to fit different environments. This can be done in one of the following two ways:

  • The first way is to put your overrides in a file named docker-compose.override.yml. This file is read automatically by docker-compose. The options in docker-compose.yml are applied first and then the options in docker-compose.override.yml are applied.
  • The second option is to use the -f flag to docker-compose. You may ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required