Browse Source

new: dev: [compose-core] added ``service_base_image_id`` function for charms

Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
cache-relation
Valentin Lab 4 years ago
parent
commit
9f43a4cb87
  1. 13
      bin/compose-core

13
bin/compose-core

@ -514,6 +514,19 @@ service_base_image_export_dir() {
} }
export -f service_base_image_export_dir export -f service_base_image_export_dir
service_base_image_id() {
local service="$1" src="$2" dst="$3" base_image
shift
base_image=$(service_base_docker_image "$service") || return 1
if ! docker_has_image "$base_image"; then
docker pull "$base_image"
fi
docker inspect "$base_image" --format="{{ .Id }}"
}
export -f service_base_image_id
## ##
## Generic ## Generic
## ##

Loading…
Cancel
Save