Repository navigation
feat(container): publish an Ubuntu computer image for computer-use workspaces - #1778
Merged
Merged
Conversation
…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.
This was referenced Nov 9, 2026
Merged
Merged
edenreich
marked this pull request as ready for review
November 9, 2026 17:11
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
Contributor
|
🎉 This PR is included in version 0.251.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
inferand 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 daemonruns on an Xvfb display (:99, 1280x800) with openbox and a wallpaper.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 toinferand starts the desktop. The pattern is the same as linuxserver.io's/custom-cont-init.dand cloud-init on a VM.Changes
computer/Dockerfile:ubuntu:26.04with xvfb, openbox,python3-xdg(openbox's XDG autostart), tint2, xterm, fonts, the Adwaita icons, git and curl.ubuntuuser is replaced withinfer(uid 1000), andUSER inferis set.computer/entrypoint.sh:/var/lib/cloud/seed/nocloud/user-data. It must start with#!. Output is teed to/var/log/cloud-init-output.log.HOME=/home/infer setpriv --reuid=infer --regid=infer --init-groupsback into itself.infer, it starts Xvfb,xsetroot,openbox-session(which runs XDG autostart) and tint2, thenexec infer "$@".buffer overflow detected) withlauncher_apps_dir. The entrypoint writeslauncher_item_applines for the apps in/usr/share/applicationsinstead, after user-data has run, so apps the script installs show up.computer/tint2rc: the taskbar.Taskfile.yml:container:build:computerandcontainer:push:computer(amd64 and arm64)..github/workflows/release.ymlpushes both images.docs/computer-use.md: a "The computer image" section with auser_dataexample.Verified locally (arm64):
infer daemonbecame PID 1 asinfer. Xvfb, openbox and tint2 also run asinfer.The image is 1.07GB. Most of it is Mesa/LLVM (Xvfb's GL stack) and GTK3 (tint2), which a browser needs anyway.
Related:
user_datafor workspaces: feat(workspaces): pass cloud-init user_data to kubernetes workspaces #1777