Files
mtusi2026lab6/tools/docker-compat/docker
T

17 lines
689 B
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/sh
# Только для Docker Desktop с docker/cli#4958: прямой Compose сохраняет
# OTEL_RESOURCE_ATTRIBUTES приложения. Остальные команды идут в Docker CLI.
set -eu
docker_cli=${LAB6_DOCKER_CLI:-/Applications/Docker.app/Contents/Resources/bin/docker}
script_dir=$(CDPATH= cd "$(dirname "$0")" && pwd)
compose_cli=${LAB6_COMPOSE_CLI:-$script_dir/../../.local-tools/compose-v5.6.1/docker-compose}
if [ "${1:-}" = compose ]; then
shift
if [ ! -x "$compose_cli" ]; then
echo 'Run sh tools/docker-compat/setup.sh or set LAB6_COMPOSE_CLI.' >&2
exit 2
fi
exec "$compose_cli" "$@"
fi
exec "$docker_cli" "$@"