Docker Community Forums

Share and learn in the Docker community.

Docker cloud CLI YAML inheritance


(Andrew McLagan) #1

There is no documentation of YAML file inheritance within docker-cloud CLI.

With compose its possible to stack the YAML files with each consecutive file overriding the latter.

thanks :slightly_smiling:


Auto re-deploy fails ... allot
(Fernando Mayo) #2

It’s not documented because it’s not supported :slightly_smiling: Because the YAML file that Docker Cloud uses is strictly for deployment purposes and has environment-specific configuration on it, we recommend storing a fully standalone “docker-cloud.yml” file separate from “docker-compose.yml” that you might use for local development.


(Andrew McLagan) #3

Cool :slight_smile:

I had thoughts that configurations share allot of similarities between environments e.g. local, testing, QA and production.

For example the name, links, ports and some env variables are all common between these environments.

Correct me if Im wrong although one of the core premises of Docker is that developers are working in a near production environment all the way through.

Therefore when a dev changes say the “web” service configuration, they have to be sure to follow on those changes through their remote docker-cloud.yml configurations: staging, testing, production? Seems error prone?

If it were possible to inherit from a base configuration it would save this redundant code? Perhaps even dropping any docker-compose specific commands not supported / relevant to docker-cloud?

e.g.

base.yml >> docker-compose.yml  == development

base.yml >> docker-cloud.yml >> staging.yml == staging

base.yml >> docker-cloud.yml >> testing.yml == testing

base.yml >> docker-cloud.yml >> production.yml == production