From b3adda43e4816eeaa337eb20f935e104556ace04 Mon Sep 17 00:00:00 2001 From: Arkadii Yakovets Date: Mon, 16 Oct 2023 08:46:56 -0700 Subject: [PATCH] Explicitly remove existing API containers --- .../api-configuration/api-server-instance-user-data.tpl.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/infrastructure/api-configuration/api-server-instance-user-data.tpl.sh b/infrastructure/api-configuration/api-server-instance-user-data.tpl.sh index 757f4468f..a89fc0e73 100644 --- a/infrastructure/api-configuration/api-server-instance-user-data.tpl.sh +++ b/infrastructure/api-configuration/api-server-instance-user-data.tpl.sh @@ -132,8 +132,11 @@ chmod a+rwx /tmp/volumes_static # Pull the API image. docker pull "${dockerhub_repo}/${api_docker_image}" +# shellcheck disable=SC2046 +docker rm -f $(docker ps --quiet --all) || true + # These database values are created after TF -# is run, so we have to pass them in programatically +# is run, so we have to pass them in programatically. docker run \ --detach \ --env DATABASE_HOST="${database_host}" \