ЛР 4: S3-вложения, доступ и отказоустойчивость — на 3
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
# Explicit Compose labels scope the socket to this local test project.
|
||||
case "${LAB4_PROJECT:-}" in
|
||||
mtusi-lab4-grade3|mtusi-lab4-grade3-*) ;;
|
||||
*) echo 'LAB4_PROJECT must identify the Lab 4 test stack' >&2; exit 2 ;;
|
||||
esac
|
||||
|
||||
container() {
|
||||
ids=$(docker ps -aq --filter "label=com.docker.compose.project=$LAB4_PROJECT" \
|
||||
--filter "label=com.docker.compose.service=$1" \
|
||||
--filter 'label=com.docker.compose.oneoff=False')
|
||||
set -- $ids
|
||||
if [ "$#" -ne 1 ]; then
|
||||
echo 'Expected one Lab 4 service container' >&2
|
||||
return 2
|
||||
fi
|
||||
printf '%s\n' "$1"
|
||||
}
|
||||
Reference in New Issue
Block a user