aboutsummaryrefslogtreecommitdiffstats
path: root/mcp/scripts/lib_jump_common.sh
diff options
context:
space:
mode:
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>2018-11-28 18:11:20 +0100
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>2018-11-29 19:33:33 +0000
commit904183e275ca6b2aa6cad11a330fc060d5379b3e (patch)
tree58a799d83ac35be7317c80afebcbfae198feb560 /mcp/scripts/lib_jump_common.sh
parentcee4e0ca227509ea8386934a15f748b8077f4e18 (diff)
[docker] compose: Switch ip_range to ipv4_address
Explicitly set the ipv4_address for each network instead of relying on ip_range allocation, which seems to fail / not be picked up. While at it, use docker-compose 1.22 or newer to bypass slow Docker network creation with 'macvlan' driver [1]. [1] https://github.com/docker/compose/issues/5248 Change-Id: Ic31851522576ebb2407d869b7c3ed7bd06951922 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
Diffstat (limited to 'mcp/scripts/lib_jump_common.sh')
-rw-r--r--mcp/scripts/lib_jump_common.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/mcp/scripts/lib_jump_common.sh b/mcp/scripts/lib_jump_common.sh
index 02ada44e9..5b09c29ab 100644
--- a/mcp/scripts/lib_jump_common.sh
+++ b/mcp/scripts/lib_jump_common.sh
@@ -114,7 +114,9 @@ function docker_install {
fi
fi
# Distro-provided docker-compose might be simply broken (Ubuntu 16.04, CentOS 7)
- if ! docker-compose --version > /dev/null 2>&1; then
+ if ! docker-compose --version > /dev/null 2>&1 || \
+ [ "$(docker-compose version --short | tr -d '.')" -lt 1220 ] && \
+ [ "$(uname -m)" = 'x86_64' ]; then
COMPOSE_BIN="${image_dir}/docker-compose"
COMPOSE_VERSION='1.22.0'
notify_n "[WARN] Using docker-compose ${COMPOSE_VERSION} in ${COMPOSE_BIN}" 3