mirror of
https://github.com/nickyeoman/docker-compose-cookbooks.git
synced 2026-09-04 02:46:23 +00:00
added builder script
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Function to parse and handle the variable
|
||||
extract_image_name() {
|
||||
local dirty_img="$1"
|
||||
|
||||
if [[ "$dirty_img" == *\$* ]]; then
|
||||
extracted_value=$(echo "$dirty_img" | sed -n 's/.*:-\([^}]*\)}.*/\1/p')
|
||||
else
|
||||
extracted_value=$dirty_img
|
||||
fi
|
||||
|
||||
echo "$extracted_value"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user