This Dockerfile extends Anthropic's Computer Use reference implementation by: (1) installing headful Chromium (2) Exposing Chromium's port 9222 so Chrome DevTools Protocol-based frameworks (Playwright, Puppeteer) can connect to it.
git clone https://github.com/onkernel/kernel-images.git
cd kernel-images
docker build -t onkernel/kernel-chromium:latest -f containers/docker/Dockerfile .docker run -e CHROMIUM_FLAGS="--no-sandbox --disable-dev-shm-usage --disable-gpu --start-maximized --disable-software-rasterizer --remote-allow-origins=* --no-zygote" -p 8501:8501 -p 8080:8080 -p 6080:6080 -p 9222:9222 kernel-chromiumThis exposes three ports:
8080: Anthropic's Computer Use web application, which includes a chat interface and remote GUI6080: NoVNC interface for visual monitoring via browser-based VNC client9222: Chrome DevTools Protocol for browser automation via Playwright and Puppeteer8501: Streamlit interfaced used by Computer Use
You can set the browser width and height with the environment variables WIDTH and HEIGHT, and control Chromium startup flags with CHROMIUM_FLAGS in the docker run command:
docker run -e WIDTH=1920 -e HEIGHT=1080 \
-e CHROMIUM_FLAGS="--start-maximized --disable-gpu" \
-p 8501:8501 -p 8080:8080 -p 6080:6080 -p 9222:9222 kernel-chromiumWe expose port 9222 via ncat, allowing you to connect Chrome DevTools Protocol-based browser frameworks like Playwright and Puppeteer (and CDP-based SDKs like Browser Use). You can use these frameworks to drive the browser in the cloud.
First, fetch the browser's CDP websocket endpoint:
const url = "http://localhost:9222/json/version";
const response = await fetch(url);
if (response.status !== 200) {
throw new Error(
`Failed to retrieve browser instance: ${
response.statusText
} ${await response.text()}`
);
}
const { webSocketDebuggerUrl } = await response.json();Then, connect a remote Playwright or Puppeteer client to it:
const browser = await puppeteer.connect({
browserWSEndpoint: webSocketDebuggerUrl,
});or:
const browser = await chromium.connectOverCDP(webSocketDebuggerUrl);For visual monitoring, access the browser via NoVNC by opening:
http://localhost:6080/vnc.htmlFor a unified interface that includes Anthropic Computer Use's chat (via Streamlit) plus GUI (via noVNC), visit:
http://localhost:8080See here for license and contributing details.
We're hiring exceptional senior and staff backend engineers to work on the future of AI infrastructure. Full-time or contract-to-hire. Join a small team that punches well above its weight, minimal meetings and no bureaucracy. By developers, for developers.
$175k-200k + equity + great healthcare. Remote in the continental US.
Things we're working on: serverless, containers/vms/unikernels, streaming, SDKs, CLIs.
Message catherine jue on Discord with what you've been building lately.