mirror of
https://github.com/nickyeoman/docker-compose-cookbooks.git
synced 2026-09-04 02:46:23 +00:00
Builder Changes to get Mariadb working
This commit is contained in:
+2
-2
@@ -15,8 +15,8 @@ get_env_vars() {
|
||||
local compose_content="$1"
|
||||
local env_vars=""
|
||||
|
||||
# Use yq to extract environment variables from services
|
||||
env_vars=$(echo "$compose_content" | yq eval '.services.*.environment[]' - 2>/dev/null)
|
||||
# Use yq to extract the environment variables in 'key: value' format
|
||||
env_vars=$(echo "$compose_content" | yq eval '.services.*.environment | to_entries | .[] | "\(.key): \(.value)"' - 2>/dev/null)
|
||||
|
||||
echo "$env_vars"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user