diff --git a/containers/docker/Dockerfile b/containers/docker/Dockerfile index 60ffaedc..c9b1d820 100644 --- a/containers/docker/Dockerfile +++ b/containers/docker/Dockerfile @@ -33,9 +33,11 @@ DISPLAY=:1 chromium \ --no-sandbox \ --disable-dev-shm-usage \ --disable-gpu \ + --start-maximized \ --disable-software-rasterizer \ --remote-allow-origins=* \ --no-zygote >&2 & + echo "Setting up ncat proxy on port $CHROME_PORT" ncat \ --sh-exec "ncat localhost $INTERNAL_PORT" \ diff --git a/containers/docker/README.md b/containers/docker/README.md index 652285aa..af57c370 100644 --- a/containers/docker/README.md +++ b/containers/docker/README.md @@ -23,6 +23,13 @@ This exposes three ports: - `9222`: Chrome DevTools Protocol for browser automation via Playwright and Puppeteer - `8501`: Streamlit interfaced used by Computer Use +## Live View Configuration +You can set the browser width and height with the environment variables `WIDTH` and `HEIGHT` in the `docker run` command: + +```bash +docker run -e WIDTH=1920 -e HEIGHT=1080 -p 8501:8501 -p 8080:8080 -p 6080:6080 -p 9222:9222 kernel-chromium +``` + ## 👾 Connect via Chrome DevTools Protocol We 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. diff --git a/unikernels/unikraft-cu/wrapper.sh b/unikernels/unikraft-cu/wrapper.sh index ed37eeb9..ca905989 100755 --- a/unikernels/unikraft-cu/wrapper.sh +++ b/unikernels/unikraft-cu/wrapper.sh @@ -27,6 +27,7 @@ DISPLAY=:1 chromium \ --no-sandbox \ --disable-dev-shm-usage \ --disable-gpu \ + --start-maximized \ --disable-software-rasterizer \ --remote-allow-origins=* \ --no-zygote >&2 &