Skip to content

Commit 19edd0f

Browse files
author
박성모
committed
feat(install): auto-build openclaw:local image before compose_up
The openclaw upstream docker-compose.yml uses ${OPENCLAW_IMAGE:-openclaw:local} as the default image tag. 'openclaw:local' is not in any registry — it must be built locally from $OPENCLAW_DIR/Dockerfile (upstream's scripts/docker/setup.sh does this). Without that build step, compose_up tries to pull and dies: Error response from daemon: pull access denied for openclaw, repository does not exist or may require 'docker login' Add a build step inside step_compose_up: when target tag equals 'openclaw:local' and 'docker image inspect' returns nothing, run DOCKER_BUILDKIT=1 docker build -t openclaw:local "$OPENCLAW_DIR". Skip if the user has set a custom $OPENCLAW_IMAGE pointing to a registry image. Update TROUBLESHOOTING '원인 B — 이미지 pull 실패' with the specific 'pull access denied for openclaw' message and self-update guidance.
1 parent 0546cbb commit 19edd0f

2 files changed

Lines changed: 32 additions & 2 deletions

File tree

docs/TROUBLESHOOTING.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -524,11 +524,19 @@ lsof -nP -iTCP:8000 -sTCP:LISTEN
524524

525525
**원인 B — 이미지 pull 실패**
526526
```
527-
Error response from daemon: pull access denied / manifest unknown
527+
Error response from daemon: pull access denied for openclaw,
528+
repository does not exist or may require 'docker login'
528529
```
530+
- *`openclaw:local` 을 pull 하려고 함*`openclaw:local`**로컬 빌드 이미지**라 레지스트리에 없습니다. v0.1.9 이상은 `compose_up` 직전에 자동으로 `docker build -t openclaw:local "$OPENCLAW_DIR"` 를 실행합니다. 이전 버전은 `./openclaw self-update` 후 재시도하거나, 수동으로:
531+
```bash
532+
cd "$OPENCLAW_DIR"
533+
DOCKER_BUILDKIT=1 docker build -t openclaw:local .
534+
cd -
535+
./openclaw install
536+
```
529537
- *공개 이미지인데 401* — Docker Hub 무인증 한도 초과(드뭄). `docker login` 후 재시도.
530538
- *비공개 레지스트리*`docker login <레지스트리>` 필요.
531-
- *태그 오타*`OPENCLAW_REPO` 의 compose 파일 이미지 태그 확인.
539+
- *태그 오타*`OPENCLAW_REPO` 의 compose 파일 이미지 태그 확인. 다른 이미지를 쓰려면 `.env``OPENCLAW_IMAGE` 를 그 태그로 지정.
532540

533541
**원인 C — Compose 파일 문법 오류**
534542
```

openclaw-mgr/cmd/install.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,28 @@ step_compose_up() {
280280
info "OpenClaw Docker 이미지 없음 — 처음 실행 시 pull 됩니다."
281281
fi
282282

283+
# ── openclaw:local 자동 빌드 ──────────────────────────────────────────────
284+
# docker-compose.yml 의 기본 이미지 태그는 'openclaw:local' 인데, 이건
285+
# 레지스트리에 없고 로컬에서 'docker build' 로 만들어야 한다. 사용자가
286+
# 다른 이미지(${OPENCLAW_IMAGE})를 지정하지 않은 경우 자동으로 빌드한다.
287+
local target_image="${OPENCLAW_IMAGE:-openclaw:local}"
288+
if [ "$target_image" = "openclaw:local" ]; then
289+
if ! docker image inspect "$target_image" >/dev/null 2>&1; then
290+
if [ -f "$OPENCLAW_DIR/Dockerfile" ]; then
291+
info "openclaw:local 이미지가 없습니다 — 로컬에서 빌드합니다 (몇 분 소요)"
292+
( cd "$OPENCLAW_DIR" \
293+
&& DOCKER_BUILDKIT=1 docker build -t openclaw:local . ) \
294+
|| { err "openclaw:local 이미지 빌드 실패"; return 1; }
295+
ok "이미지 빌드 완료: openclaw:local"
296+
else
297+
err "이미지 'openclaw:local' 도 Dockerfile 도 찾을 수 없습니다."
298+
err " - $OPENCLAW_DIR/Dockerfile 가 존재해야 합니다."
299+
err " - 또는 .env 에 OPENCLAW_IMAGE=<레지스트리 이미지> 를 지정하세요."
300+
return 1
301+
fi
302+
fi
303+
fi
304+
283305
local existing_containers
284306
existing_containers="$(docker ps -a --format '{{.Names}}\t{{.Status}}' 2>/dev/null \
285307
| grep -iE 'openclaw' || true)"

0 commit comments

Comments
 (0)