#!/bin/sh set -eu : "${TARGET_INSTANCE_ID:?test provides target API instance alias}" cid=$(docker ps -q --filter "label=lab.instance_id=${TARGET_INSTANCE_ID}") if [ -z "$cid" ]; then echo "no running API replica for the requested instance" >&2 exit 1 fi # Leave this replica stopped. Do not stop the database, broker, or load balancer. docker stop -t 5 $cid >/dev/null exit 0