From b4b2152dd3270e6fbdcd62c3861c22a77c704657 Mon Sep 17 00:00:00 2001 From: Ryan Chu Date: Mon, 28 Jan 2019 00:00:38 +0100 Subject: [PATCH] Start the docker machine and update with new TLS certificates After the system reboots, the docker machine is created, but in a stopped state. To handle the case that a developer may rerun the provisioning scripts for the missed docker images, make sure the docker machine is both started and running with new TLS certificates. Change-Id: Ibdb58152cac860132a77d6d094f9bca20a5e95e8 Reviewed-by: Edward Welbourne --- coin/provisioning/common/shared/testserver/docker_machine.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/coin/provisioning/common/shared/testserver/docker_machine.sh b/coin/provisioning/common/shared/testserver/docker_machine.sh index 9c69faa9..8d791074 100755 --- a/coin/provisioning/common/shared/testserver/docker_machine.sh +++ b/coin/provisioning/common/shared/testserver/docker_machine.sh @@ -42,6 +42,9 @@ if [ -z $(docker-machine ls -q --filter "name=$TestMachine") ] then docker-machine create $@ $TestMachine docker-machine ip $TestMachine +else + # Otherwise, start the docker machine and update with new TLS certificates. + docker-machine start $TestMachine && docker-machine regenerate-certs -f $TestMachine fi # Switch the docker engine to $TestMachine