From 67d317d81591a6215d542d1d2085bd4b6d9cea4a Mon Sep 17 00:00:00 2001 From: Valentin Lab Date: Tue, 11 Dec 2018 15:03:51 +0100 Subject: [PATCH] new: [apache] target port could end up empty if service image was not yet pulled We decide to pull the image here, as we are garanteed that if it had to be built, it was built. --- apache/lib/common | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apache/lib/common b/apache/lib/common index f17acf5..b297cca 100644 --- a/apache/lib/common +++ b/apache/lib/common @@ -465,6 +465,9 @@ __vhost_proxy_statement() { if [ -z "$TARGET" ]; then ## First exposed port: base_image=$(service_base_docker_image "$BASE_SERVICE_NAME") || return 1 + if ! docker_has_image "$base_image"; then + docker pull "$base_image" + fi first_exposed_port=$(image_exposed_ports_0 "$base_image" | tr '\0' '\n' | head -n 1 | cut -f 1 -d /) || return 1 TARGET=$MASTER_BASE_SERVICE_NAME:$first_exposed_port info "No target was specified, introspection found: $TARGET"