docker(launcher): include node runtime

This commit is contained in:
duomi 2026-03-14 03:16:49 +08:00
parent c68b4f3903
commit 4fae3fc00f
3 changed files with 27 additions and 1 deletions

View file

@ -197,6 +197,7 @@ docker compose -f docker/docker-compose.yml --profile gateway down
### Launcher Mode (Web Console)
The `launcher` image includes all three binaries (`picoclaw`, `picoclaw-launcher`, `picoclaw-launcher-tui`) and starts the web console by default, which provides a browser-based UI for configuration and chat.
It also ships with a Node.js runtime so npm-based MCP servers and scripts can run inside the launcher container without rebuilding the image.
```bash
docker compose -f docker/docker-compose.yml --profile launcher up -d

View file

@ -1,4 +1,4 @@
FROM alpine:3.21
FROM node:24-alpine3.23
ARG TARGETPLATFORM

View file

@ -0,0 +1,25 @@
package docker
import (
"os"
"strings"
"testing"
)
func TestLauncherDockerfileIncludesNodeRuntime(t *testing.T) {
data, err := os.ReadFile("Dockerfile.goreleaser.launcher")
if err != nil {
t.Fatalf("read Dockerfile.goreleaser.launcher: %v", err)
}
content := string(data)
if !strings.Contains(content, "FROM node:") {
t.Fatalf("launcher Dockerfile should use a Node.js runtime base image, got:\n%s", content)
}
if !strings.Contains(content, "COPY $TARGETPLATFORM/picoclaw-launcher /usr/local/bin/picoclaw-launcher") {
t.Fatal("launcher Dockerfile should still copy the launcher binary")
}
if !strings.Contains(content, "ENTRYPOINT [\"picoclaw-launcher\"]") {
t.Fatal("launcher Dockerfile should keep picoclaw-launcher as the entrypoint")
}
}