Files
karuo-ai/01_卡资(金)/金仓_存储备份/docker-mac-host-shell/run-shell.sh
2026-07-19 00:21:46 +08:00

13 lines
449 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.

#!/usr/bin/env bash
set -euo pipefail
cd "$(dirname "$0")"
# 宿主目录:默认为当前 Mac 用户的 $HOME一般为 /Users/karuo可收窄以减轻同步
# HOST_MOUNT="$HOME/Documents" ./run-shell.sh
export HOST_UID="${HOST_UID:-$(id -u)}"
export HOST_GID="${HOST_GID:-$(id -g)}"
export HOST_MOUNT="${HOST_MOUNT:-$HOME}"
docker compose build --pull --build-arg "HOST_UID=$HOST_UID"
exec docker compose run --rm shell zsh -l "$@"