From de775b4b1bd719e4903b968eda985354a509a233 Mon Sep 17 00:00:00 2001 From: Paul Robello Date: Mon, 23 Oct 2023 12:26:28 -0700 Subject: [PATCH] stop-ls.sh now stops containers started by localstack so lambdas dont get orphaned --- docker-compose.yml | 2 +- root/bin/ls/stop-ls.sh | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index fc1e4f9..dac3941 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -114,7 +114,7 @@ services: - PROXY_VOLUME_DIR # where to persist cert files. defaults to /tmp/mitproxy - PROXY_URL # http(s) proxy to use. if USE_PROXY_HOST is enabled will be set to http://PROXY_CONTAINER_NAME:8080 - PROXY_AUTO_EXPORT_ENV # auto export HTTP_PROXY and HTTPS_PROXY vars equal to PROXY_URL - - DEV_CONTAINER=1.9.5 # used to detect if running inside dev container + - DEV_CONTAINER=1.9.6 # used to detect if running inside dev container volumes: - /var/run/docker.sock:/var/run/docker.sock # allow container to interact with host docker - "${GDC_DIR}:/root/gdc-host" # mount gdc folder inside container to get access to compose files diff --git a/root/bin/ls/stop-ls.sh b/root/bin/ls/stop-ls.sh index 45b5530..b6d3144 100755 --- a/root/bin/ls/stop-ls.sh +++ b/root/bin/ls/stop-ls.sh @@ -7,6 +7,7 @@ if [[ "$1" = "--help" || "$1" = "-h" ]]; then exit 0 fi - docker rm -f "$LS_MAIN_CONTAINER_NAME" +docker ps -a --format '{{.Names}}' | grep "^$(echo "$LS_MAIN_CONTAINER_NAME-" | tr "_" "-")" | xargs -I {} docker rm -f {} + sleep 2