I hope the real version doesn’t have the spelling problem!
Comment on How to manage docker compose apps?
eksb@programming.dev 6 months ago
I have 5 docker-compose-based services. I wrote a shell script:
#!/usr/bin/env bash for y in $(find /etc/ -name docker-compose.yml); do cd $(dirname $y) docker compose pull systemctl resteart $y done
Unquote0270@programming.dev 6 months ago
qqq@lemmy.world 6 months ago
For loops with find are evil for a lot of reasons, one of which is spaces:
You can kinda fix that with IFS:
But you can also use something like:
find . -name 'docker-compose.yml' -printf '%h\0' | xargs -0 ...or in your case this could work:
find . -name 'docker-compose.yml' -execdir ...