跳到主要内容

Claude Cage · 面向 Claude 的隔离开发环境,支持桌面工作台、多账号、远程部署与移动端连接。上游 Lee-xeo/Claude-Cage 完整源码镜像,非灵栈原创;主许可 MIT,第三方组件遵循各自许可。来源:https://github.com/Lee-xeo/Claude-Cage 。手动同步,不附带 Release 安装包。

浏览文件

docker.lima

25 行 · 898 B历史下载
1#!/bin/sh
2set -eu
3
4# Environment Variables
5# LIMA_INSTANCE: Specifies the name of the Lima instance to use. Default is "docker".
6
7: "${LIMA_INSTANCE:=docker}"
8: "${DOCKER:=docker}"
9
10if [ "$(limactl ls -q "$LIMA_INSTANCE" 2>/dev/null)" != "$LIMA_INSTANCE" ]; then
11 echo "instance \"$LIMA_INSTANCE\" does not exist, run \`limactl create --name=$LIMA_INSTANCE template:docker\` to create a new instance" >&2
12 exit 1
13elif [ "$(limactl ls -f '{{ .Status }}' "$LIMA_INSTANCE" 2>/dev/null)" != "Running" ]; then
14 echo "instance \"$LIMA_INSTANCE\" is not running, run \`limactl start $LIMA_INSTANCE\` to start the existing instance" >&2
15 exit 1
16fi
17DOCKER=$(command -v "$DOCKER" || true)
18if [ -n "$DOCKER" ]; then
19 DOCKER_HOST=$(limactl list "$LIMA_INSTANCE" --format 'unix://{{.Dir}}/sock/docker.sock')
20 export DOCKER_HOST
21 exec "$DOCKER" "$@"
22else
23 export LIMA_INSTANCE
24 exec lima docker "$@"
25fi