ЛР 3 — БПИ2301 — Каменски — на 5 #23

Closed
kmwk10 wants to merge 30 commits from kmwk10/mtusi2026lab3:solution/BPI2301-kamenski into main
Showing only changes of commit d054cea37f - Show all commits
+8
View File
@@ -0,0 +1,8 @@
#!/bin/sh
set -eu
: "${TARGET_INSTANCE_ID:?test provides target API instance alias}"
service=$(docker inspect -f '{{index .Config.Labels "com.docker.compose.service"}}' "$TARGET_INSTANCE_ID")
[ "$service" = "api" ] || { echo "not an api container" >&2; exit 1; }
docker stop -t 5 "$TARGET_INSTANCE_ID" >/dev/null