-
I am setting up a workspace that will eventually generate my full docker-compose.yml files. I got yq to merge files properly but am wondering if there is a way to sort based on the keys in a specific order. For example - have the keys sort first by version, then services and put networks and volumes at the bottom in a manner that compose files typically look like. Right now I am using this command to merge the files |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
yq will keep the keys in the order of the first file given, so you should be able to do something like:
where template.yml is: version:
services:
networks:
volumes: |
Beta Was this translation helpful? Give feedback.
yq will keep the keys in the order of the first file given, so you should be able to do something like:
where template.yml is: