|
|
@ -1,6 +1,5 @@ |
|
|
|
#!/bin/bash |
|
|
|
|
|
|
|
|
|
|
|
## |
|
|
|
## TODO: |
|
|
|
## - subordinate container should really be able to modify base image of their master |
|
|
@ -267,10 +266,9 @@ docker_has_image() { |
|
|
|
export -f docker_has_image |
|
|
|
|
|
|
|
cmd_on_base_image() { |
|
|
|
local charm="$1" |
|
|
|
local charm="$1" base_image |
|
|
|
shift |
|
|
|
base_image=$(service_base_docker_image "$charm") || return 1 |
|
|
|
|
|
|
|
docker run -i --entrypoint /bin/bash "$base_image" -c "$*" |
|
|
|
} |
|
|
|
export -f cmd_on_base_image |
|
|
@ -283,7 +281,6 @@ cached_cmd_on_base_image() { |
|
|
|
quick_cat_stdin < "$cache_file" |
|
|
|
return 0 |
|
|
|
fi |
|
|
|
base_image=$(service_base_docker_image "$charm") || return 1 |
|
|
|
result=$(cmd_on_base_image "$charm" "$@") || return 1 |
|
|
|
echo "$result" | tee "$cache_file" |
|
|
|
} |
|
|
@ -2062,8 +2059,6 @@ _setup_state_dir() { |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
get_docker_compose_opts_list() { |
|
|
|
local action="$1" cache_file="$CACHEDIR/$FUNCNAME.cache.$(echo "$action"; cat "$(which docker-compose)" | md5_compat)" |
|
|
|
if [ -e "$cache_file" ]; then |
|
|
@ -2394,6 +2389,3 @@ case "$action" in |
|
|
|
fi |
|
|
|
;; |
|
|
|
esac |
|
|
|
|
|
|
|
|
|
|
|
|