From a18c2e109aebed1f8c15eeddac5bee58cb0eb5f4 Mon Sep 17 00:00:00 2001 From: John McCabe Date: Wed, 9 Aug 2017 21:34:14 +0100 Subject: [PATCH] Add PowerShell script to start Docker stack This commit adds a PowerShell script that mirrors the existing `deploy_stack.*` scripts. It also checks that docker is installed and returns a readable error if not found (the alternative is a rather cryptic PowerShell error). The docker stack command itself returns a readable error if no swarm has been initialised. Signed-off-by: John McCabe --- deploy_stack.ps1 | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 deploy_stack.ps1 diff --git a/deploy_stack.ps1 b/deploy_stack.ps1 new file mode 100644 index 00000000..dedb19c6 --- /dev/null +++ b/deploy_stack.ps1 @@ -0,0 +1,11 @@ +#!ps1 + +if (Get-Command docker -errorAction SilentlyContinue) +{ + Write-Host "Deploying stack" + docker stack deploy func --compose-file ./docker-compose.yml +} +else +{ + Write-Host "Unable to find docker command, please install Docker (https://www.docker.com/) and retry" +}