Skip to content

feat(container): publish an Ubuntu computer image for computer-use workspaces - #1778

Merged
edenreich merged 1 commit into
mainfrom
feat/computer-image
Nov 9, 2026
Merged

edenreich merged 1 commit into
mainfrom
feat/computer-image

Conversation

@edenreich

@edenreich edenreich commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The desktop app built its own computer-use image locally: Ubuntu, Xvfb, openbox and Firefox, and nothing else. When an agent closed the browser, the screen went black. Only the bare X root window was left, with nothing to click. The image pins and runs infer and depends on cli contracts (X11 capture, the daemon binding, the browser relay), so the cli now owns and publishes it.

ghcr.io/inference-gateway/computer, released with the CLI under the same tags, is a minimal Ubuntu 26.04 desktop:

  • infer daemon runs on an Xvfb display (:99, 1280x800) with openbox and a wallpaper.
  • A tint2 taskbar has launchers for the installed apps, the open windows and a clock.
  • Normal windows open maximized above the taskbar.

It ships no browser. Clients install what they need with cloud-init user_data. The entrypoint is the container's stand-in for cloud-init: started as root, it runs the script from the NoCloud seed path, then drops to infer and starts the desktop. The pattern is the same as linuxserver.io's /custom-cont-init.d and cloud-init on a VM.

Changes

  • computer/Dockerfile:
    • Base is ubuntu:26.04 with xvfb, openbox, python3-xdg (openbox's XDG autostart), tint2, xterm, fonts, the Adwaita icons, git and curl.
    • The ubuntu user is replaced with infer (uid 1000), and USER infer is set.
    • openbox maximizes normal windows.
  • computer/entrypoint.sh:
    • As root, it runs /var/lib/cloud/seed/nocloud/user-data. It must start with #!. Output is teed to /var/log/cloud-init-output.log.
    • It then runs HOME=/home/infer setpriv --reuid=infer --regid=infer --init-groups back into itself.
    • As infer, it starts Xvfb, xsetroot, openbox-session (which runs XDG autostart) and tint2, then exec infer "$@".
    • tint2 17.0.1 aborts (buffer overflow detected) with launcher_apps_dir. The entrypoint writes launcher_item_app lines for the apps in /usr/share/applications instead, after user-data has run, so apps the script installs show up.
  • computer/tint2rc: the taskbar.
  • Taskfile.yml: container:build:computer and container:push:computer (amd64 and arm64). .github/workflows/release.yml pushes both images.
  • docs/computer-use.md: a "The computer image" section with a user_data example.

Verified locally (arm64):

  • As root with a seed script: the script ran and infer daemon became PID 1 as infer. Xvfb, openbox and tint2 also run as infer.
  • With the desktop app's default script (Firefox ESR plus opentask): Firefox autostarted maximized, the extension connected to the daemon, and the taskbar showed XTerm and Firefox launchers.
  • As uid 1000 with no seed: it boots straight to the desktop.

The image is 1.07GB. Most of it is Mesa/LLVM (Xvfb's GL stack) and GTK3 (tint2), which a browser needs anyway.

Related:

…rkspaces

ghcr.io/inference-gateway/computer, released with the CLI under the same
tags, is a minimal Ubuntu 26.04 desktop for an agent of its own: infer
daemon on an Xvfb display with openbox, a wallpaper and a tint2 taskbar
whose launchers list the installed apps. Closing an app now leaves a desktop
to reopen it from, not a black screen. It ships no browser.

Started as root, the entrypoint runs the cloud-init user-data the operator
mounts at /var/lib/cloud/seed/nocloud/user-data, logs it to
/var/log/cloud-init-output.log, then drops to the infer user with setpriv
and starts the desktop. openbox-session runs XDG autostart, so an app the
script adds there opens at boot, and normal windows open maximized.

tint2 17.0.1 aborts with launcher_apps_dir, so the entrypoint writes the
launchers itself once user-data has run.
@github-project-automation github-project-automation Bot moved this to Todo in 2026 Nov 9, 2026
@edenreich
edenreich marked this pull request as ready for review November 9, 2026 17:11
@edenreich
edenreich requested a review from a team as a code owner November 9, 2026 17:11
@edenreich
edenreich merged commit acec124 into main Nov 9, 2026
1 check passed
@edenreich
edenreich deleted the feat/computer-image branch November 9, 2026 17:12
edenreich added a commit that referenced this pull request Nov 9, 2026
… needs client certs (#1779)

## Summary

A computer-use workspace pod now runs Firefox with the opentask
extension, so its agent can use the cheaper `browser_*` tools. The
extension dials the daemon at plain `ws://127.0.0.1:<port>/ws` and
authenticates with a token in its `browser_hello`. In a Kubernetes pod,
though, the operator serves the daemon's AG-UI binding as
`0.0.0.0:52789` with mutual TLS. That binding was the only listener, so
the extension could never connect.

When the extension backend is on and the binding requires client
certificates, the daemon now also listens on plain
`127.0.0.1:<browser_use.extension.port>` for the extension. That
listener uses the extension token, the same handshake, origin check and
handler, and none of the binding's HTTP routes, so the terminal, screen,
artifacts and peer A2A endpoint stay behind mTLS. Every other
configuration keeps its single listener.

## Changes

- `config/daemon.go`: `(*Config).ExtensionLoopback()` is a pure config
rule. It answers whether the loopback listener is needed and what it
serves, and it fails boot clearly in two cases:
- the extension port equals the binding port, including an unset
`daemon.binding.port` that falls back to it
  - the extension token is empty

  `servesMutualTLS()` is TLS on with client certificates required.
- `config/browser_use.go`: an `extensionBackend()` helper.
- `cmd/daemon/daemon.go`:
- `startExtensionLoopback` starts the listener after the main binding,
closes the main binding if the loopback fails, and closes the loopback
on stop.
  - `startThreads` builds the handler once.
- `config/daemon_test.go`: a table test covering when the listener is
needed, the port fallback, and both errors.
- `tests/e2e/daemon_test.go`: with a binding that requires client certs:
  - a TLS dial without a certificate is refused
- a `chrome-extension://` WebSocket on the loopback port gets
`browser_hello_ack`
  - `/terminal/` on the loopback port answers 404

  This test fails against the daemon without this change.
- `docs/daemon.md`: one paragraph in "The binding".

Verified:
- `task lint` reports 0 issues, and the `config`, `cmd`, `agui` and
`browser` tests pass.
- `task test:e2e` passes.
- With the computer image and Firefox ESR plus opentask configured by
policy, the extension attaches on its own (`browser extension
attached`).

Related:
- Computer image: #1778
- `user_data`: #1777
- Operator: inference-gateway/operator#337
@inference-gateway-releaser

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 0.251.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@inference-gateway-releaser inference-gateway-releaser Bot added the released Shipped in a release label Nov 9, 2026
@edenreich edenreich moved this from Todo to Done in 2026 Nov 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released Shipped in a release

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant