|
@ -1430,7 +1430,7 @@ service_base_docker_image() { |
|
|
## According to https://stackoverflow.com/questions/32230577 , if there's a build, |
|
|
## According to https://stackoverflow.com/questions/32230577 , if there's a build, |
|
|
## then the builded image will get name ${project}_${service} |
|
|
## then the builded image will get name ${project}_${service} |
|
|
project=$(get_default_project_name) || return 1 |
|
|
project=$(get_default_project_name) || return 1 |
|
|
image_name="${project}_${service}" |
|
|
|
|
|
|
|
|
image_name="${project}_${master_service}" |
|
|
if ! docker_has_image "$image_name"; then |
|
|
if ! docker_has_image "$image_name"; then |
|
|
service_build=$(echo "$service_def" | shyaml get-value build 2>/dev/null) |
|
|
service_build=$(echo "$service_def" | shyaml get-value build 2>/dev/null) |
|
|
if [ "$?" != 0 ]; then |
|
|
if [ "$?" != 0 ]; then |
|
@ -1439,12 +1439,12 @@ service_base_docker_image() { |
|
|
return 1 |
|
|
return 1 |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
docker build "$service_build" -t "${project}_${service}" >&2 || { |
|
|
|
|
|
err "Failed to build image for ${DARKYELLOW}$service${NORMAL}." |
|
|
|
|
|
|
|
|
docker build "$service_build" -t "${image_name}" >&2 || { |
|
|
|
|
|
err "Failed to build image '${image_name}' for ${DARKYELLOW}$service${NORMAL}." |
|
|
return 1 |
|
|
return 1 |
|
|
} |
|
|
} |
|
|
fi |
|
|
fi |
|
|
printf "%s" "${project}_${service}" |
|
|
|
|
|
|
|
|
printf "%s" "${image_name}" |
|
|
else |
|
|
else |
|
|
printf "%s" "${service_image}" |
|
|
printf "%s" "${service_image}" |
|
|
fi | tee "$cache_file" |
|
|
fi | tee "$cache_file" |
|
|