Skip to content

Latest commit

 

History

History
executable file
·
35 lines (23 loc) · 1.5 KB

README.md

File metadata and controls

executable file
·
35 lines (23 loc) · 1.5 KB

s.containers/compose-merger

Why?

With the Docker Compose v>=2.20 the includes are introduced. This is a great feature, tho some deployments still require a single file. This container merges multiple files into one.

Arguments

Name Type Default Value Description
-i string /data/compose.yml The input file.
-o string null The output file. If not set, the output will be written to stdout.
-d bool false Debug mode.

Example

Read from compose.yml and write to compose.merged.yml with read only mounted volume:

docker run --rm -v "$(pwd):/data:ro" ghcr.io/scolastico-dev/s.containers/compose-merger > compose.merged.yml

Read from comose.yml and write to compose.merged.yml:

docker run --rm -v "$(pwd):/data" ghcr.io/scolastico-dev/s.containers/compose-merger -o compose.merged.yml

Read from docker-compose.yml and write to docker-compose-merged.yml:

docker run --rm -v "$(pwd):/data" ghcr.io/scolastico-dev/s.containers/compose-merger -i docker-compose.yml -o docker-compose-merged.yml