From b2e51e5dadeef51000e3f4587a232101a5d29cde Mon Sep 17 00:00:00 2001 From: John McCabe Date: Wed, 16 Aug 2017 21:38:20 +0100 Subject: [PATCH] Check for docker in linux deploy_stack scripts This commit updates the linux (both ARM and x86) deploy_stack scripts to check for the availability of the Docker command and print the same error returned by the PS1 script if not found. Signed-off-by: John McCabe --- deploy_stack.armhf.sh | 5 +++++ deploy_stack.sh | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/deploy_stack.armhf.sh b/deploy_stack.armhf.sh index e9fcdedb..b8b0aef5 100755 --- a/deploy_stack.armhf.sh +++ b/deploy_stack.armhf.sh @@ -1,4 +1,9 @@ #!/bin/sh +if ! [ -x "$(command -v docker)" ]; then + echo 'Unable to find docker command, please install Docker (https://www.docker.com/) and retry' >&2 + exit 1 +fi + echo "Deploying stack" docker stack deploy func --compose-file docker-compose.armhf.yml diff --git a/deploy_stack.sh b/deploy_stack.sh index ff8187f9..aaea8aa1 100755 --- a/deploy_stack.sh +++ b/deploy_stack.sh @@ -1,5 +1,10 @@ #!/bin/sh +if ! [ -x "$(command -v docker)" ]; then + echo 'Unable to find docker command, please install Docker (https://www.docker.com/) and retry' >&2 + exit 1 +fi + echo "Deploying stack" docker stack deploy func --compose-file docker-compose.yml