A Node.js program to organize and sort docker-compose.yaml
files
docker-composer
uses the following dependencies:
Install all dependencies with
npm i
docker-composer
uses Node.js. To orgnanize and sort docker-compose
files and print the output to STDOUT
, execute:
node index [-h] file
or
npm start -- [-h] file
A docker-compose
file is requiered as input in the file
parameter. The sorted output will be printed to STDOUT
with the following order rules:
image
container_name
depends_on
network_mode
networks
env_file
environment
working_dir
volumes
labels
ports
- Any other key (no explicit order)
command
restart
See docker-compose.yaml
as input and docker-compose-sorted.yaml
as output