Created
October 17, 2022 12:32
-
-
Save mrsarm/f1b794858cf29ca47f36a2093b5f8be6 to your computer and use it in GitHub Desktop.
docker-compose-services: list all services found in the docker-compose.yml file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
if [ "$1" == "-h" -o "$1" == "--help" ]; then | |
echo 'docker-compose-services: list all services found in the docker-compose.yml file' | |
exit | |
fi | |
cat docker-compose.y*ml | grep -oP '(?<=^ )(\w|-)+(?=:)' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment