@@ -8,8 +8,8 @@ License: MIT. See [LICENSE](LICENSE).
88## Установка
99
1010``` bash
11- bun add -g @prover-coder-ai /docker-git
12- docker-git --help
11+ git clone https://github.com/proverCoderAI /docker-git
12+ cd docker-git
1313```
1414
1515Локальный запуск из репозитория:
@@ -22,18 +22,18 @@ bun run docker-git --help
2222## Авторизация
2323
2424``` bash
25- docker-git auth github login --web
26- docker-git auth codex login --web
27- docker-git auth claude login --web
28- docker-git auth grok login --web
25+ bun run docker-git auth github login --web
26+ bun run docker-git auth codex login --web
27+ bun run docker-git auth claude login --web
28+ bun run docker-git auth grok login --web
2929```
3030
3131## CLI пример
3232
3333Можно передавать ссылку на репозиторий, ветку (` /tree/... ` ), issue или PR.
3434
3535``` bash
36- docker-git clone https://github.com/ProverCoderAI/docker-git/issues/122 --force --mcp-playwright
36+ bun run docker-git clone https://github.com/ProverCoderAI/docker-git/issues/122 --force --mcp-playwright
3737```
3838
3939- ` --force ` пересоздаёт окружение и удаляет volumes проекта.
@@ -42,7 +42,7 @@ docker-git clone https://github.com/ProverCoderAI/docker-git/issues/122 --force
4242Автоматический запуск агента:
4343
4444``` bash
45- docker-git clone https://github.com/ProverCoderAI/docker-git/issues/122 --force --auto
45+ bun run docker-git clone https://github.com/ProverCoderAI/docker-git/issues/122 --force --auto
4646```
4747
4848- ` --auto ` сам выбирает Claude, Codex, Gemini или Grok по доступной авторизации. Если доступно несколько, выбор случайный.
@@ -52,33 +52,15 @@ docker-git clone https://github.com/ProverCoderAI/docker-git/issues/122 --force
5252Применение конфигурации:
5353
5454``` bash
55- docker-git apply
56- docker-git apply --no-up
57- docker-git apply-all
58- docker-git apply-all --active
55+ bun run docker-git apply
56+ bun run docker-git apply --no-up
57+ bun run docker-git apply-all
58+ bun run docker-git apply-all --active
5959```
6060
6161- ` apply ` применяет конфиг к одному проекту. ` --no-up ` только обновляет файлы без ` docker compose up ` .
6262- ` apply-all ` применяет конфиг ко всем проектам. ` --active ` только к запущенным контейнерам.
6363
64- ## GPU режим
65-
66- По умолчанию проекты запускаются без GPU (` gpu: "none" ` ), поэтому Docker не
67- требует NVIDIA runtime на обычных CPU-хостах.
68-
69- GPU включается только явно через ` --gpu all ` или сохранённое значение
70- ` "gpu": "all" ` в ` docker-git.json ` . Если Docker возвращает ошибку NVIDIA
71- prestart hook вида ` nvidia-container-cli ` / ` libnvidia-ml.so.1 ` , ` docker-git `
72- перезаписывает managed-файлы проекта с ` gpu: "none" ` и повторяет
73- ` docker compose up ` , чтобы среда оставалась запускаемой на хосте без рабочей
74- NVIDIA userspace-части.
75-
76- Если проекту действительно нужен GPU, установите драйвер NVIDIA и NVIDIA
77- Container Toolkit на хосте, затем снова примените конфигурацию с ` --gpu all ` .
78- GPU для controller-контейнера включается отдельно через
79- ` DOCKER_GIT_CONTROLLER_GPU=all ` ; значение по умолчанию для controller тоже
80- ` none ` .
81-
8264Для запуска WEB версии:
8365``` bash
8466bun run docker-git -- browser
@@ -102,65 +84,3 @@ API - Просто апи сервер поднятный над LIB
10284
10385APP работает только с API, и не имеет доступа к LIB
10486API работает только с LIB
105-
106- ## Runtime contract: host-Docker-backed
107-
108- ` docker-git ` is host-Docker-backed by design. The controller container
109- (` docker-git-api ` ) talks to the host Docker daemon via the bind-mounted
110- ` /var/run/docker.sock ` , which is how it creates and manages per-project
111- containers. There is no isolated Docker-in-Docker runtime.
112-
113- This means the user that runs the host CLI (` bun run docker-git ... ` ) needs
114- to be able to talk to that same socket directly. Three failure modes can
115- look superficially identical and are diagnosed separately by the CLI:
116-
117- 1 . ** Host Docker daemon is not reachable** – ` docker info ` fails with
118- "Cannot connect to the Docker daemon". Start Docker (e.g.
119- ` sudo systemctl start docker ` ) or set ` DOCKER_HOST ` to a reachable
120- endpoint.
121- 2 . ** Host Docker socket rejected this user** – ` docker info ` fails with
122- "permission denied" while talking to ` /var/run/docker.sock ` . This is a
123- host configuration issue, * not* a ` docker-git ` outage. Add the user to
124- the ` docker ` group, switch to rootless Docker, or fix the socket
125- ownership (` root:docker ` , mode ` 660 ` ). After changing groups, log out
126- and back in (or run ` newgrp docker ` ).
127- 3 . ** Controller container not running** – the host CLI cannot reach
128- ` docker-git-api ` on its API port. Bring the controller up via
129- ` docker compose up -d --build ` , or point the CLI at an existing
130- controller using ` DOCKER_GIT_API_URL ` .
131-
132- When the CLI cannot acquire Docker access it now prints a message that
133- names the specific failure mode, restates the host-Docker contract, and
134- lists remediation steps for that exact mode. Implementation lives in
135- ` packages/app/src/docker-git/controller-docker-diagnostics.ts ` .
136-
137- ## Resource limits
138-
139- ` docker-git ` caps host resource consumption at two layers so a runaway
140- project (or the controller itself) cannot consume the entire system.
141-
142- - ** Per-project containers** ship with a default limit of ` 30% ` CPU and
143- ` 30% ` RAM (resolved against the host on ` apply ` ). Override via
144- ` --cpu ` / ` --ram ` (or per-project ` docker-git.json ` ).
145- Docker Compose ` memswap_limit ` is resolved separately as the total
146- RAM+swap ceiling, defaulting to twice the resolved RAM limit.
147- - ** Controller container** (` docker-git-api ` ) is capped in
148- ` docker-compose.yml ` and ` docker-compose.api.yml ` . When started through
149- ` docker-git ` or ` ./ctl ` , the default CPU/RAM cap is resolved to ` 90% ` of
150- host resources and memory swap defaults to twice the resolved RAM limit.
151- Override with global CLI flags:
152-
153- ``` bash
154- docker-git --controller-cpu 75% --controller-ram 8g --controller-pids 8192 ps
155- ./ctl up --cpu 75% --ram 8g --pids 8192
156- ```
157-
158- The same values can be provided through env vars before ` docker-git ` or
159- ` ./ctl up ` :
160-
161- | Variable | Default | Purpose |
162- | ------------------------------ | ------- | ------------------------------------ |
163- | ` DOCKER_GIT_CONTROLLER_CPUS ` | ` 90% ` | CPU percent or cores for the controller |
164- | ` DOCKER_GIT_CONTROLLER_MEMORY ` | ` 90% ` | RAM percent or size for ` mem_limit ` |
165- | ` DOCKER_GIT_CONTROLLER_MEMORY_SWAP ` | derived from RAM | Total RAM+swap size for ` memswap_limit ` ; use Docker size units such as ` 16g ` |
166- | ` DOCKER_GIT_CONTROLLER_PIDS ` | ` 4096 ` | Maximum PIDs inside the controller |
0 commit comments