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

30 lines
1009 B
YAML
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.

# 宿主挂载开发壳 — 解决「云上控制台无 Mac 路径、无 ffmpeg」一类问题
# - 镜像内自带 ffmpeg/zsh
# - 宿主机任意目录挂载为 /host默认挂整颗 $HOME含 /Users/karuo
# 使用:本目录 ./run-shell.sh ,或 HOST_MOUNT 指向更小目录以减少同步开销。
services:
shell:
build:
context: .
dockerfile: Dockerfile
args:
HOST_UID: "${HOST_UID:-501}"
image: karuo-mac-host-shell:local
environment:
- LANG=C.UTF-8
# 容器 HOME 独立于 /host避免误改宿主 ~/.zshrc需要时用 /host/Users/…
- HOME=/home/devuser
volumes:
# 默认整块家目录可读可写Docker Desktop → Settings → Resources → File sharing 须包含)
- "${HOST_MOUNT:?请在 run-shell.sh 中设置或由脚本注入 HOST_MOUNT}:/host:cached"
working_dir: /host
stdin_open: true
tty: true
networks:
- host-shell
networks:
host-shell:
driver: bridge