fix: make Chrome work inside Docker for Claude Max OAuth login #14

Merged
cpfarhood merged 1 commits from fix/chrome-in-docker into main 2026-02-20 14:31:59 +00:00
cpfarhood commented 2026-02-20 14:30:52 +00:00 (Migrated from github.com)

Summary

  • Chrome crashes silently inside Docker without --no-sandbox and --disable-dev-shm-usage, so the OAuth browser popup never completes
  • Creates a /usr/local/bin/google-chrome wrapper that injects these required container flags
  • Sets BROWSER=/usr/local/bin/google-chrome so Claude Code (which calls xdg-open on Linux) and any other tool uses the wrapper automatically
  • Adds xdg-utils to ensure xdg-open can resolve browser handlers in the VNC environment

The OAuth callback flow works correctly once Chrome actually runs — both the browser and Claude Code's local auth server are in the same container network namespace, so the localhost redirect completes normally.

Test plan

  • Build and deploy the updated image
  • Open a terminal in the VNC session
  • Run claude — it should open Chrome in the VNC window pointing to the Claude login page
  • Log in with a Claude Max account — OAuth should complete and claude should show as authenticated
  • Start Happy Coder — confirm it connects without complaining about auth

🤖 Generated with Claude Code

## Summary - Chrome crashes silently inside Docker without `--no-sandbox` and `--disable-dev-shm-usage`, so the OAuth browser popup never completes - Creates a `/usr/local/bin/google-chrome` wrapper that injects these required container flags - Sets `BROWSER=/usr/local/bin/google-chrome` so Claude Code (which calls `xdg-open` on Linux) and any other tool uses the wrapper automatically - Adds `xdg-utils` to ensure `xdg-open` can resolve browser handlers in the VNC environment The OAuth callback flow works correctly once Chrome actually runs — both the browser and Claude Code's local auth server are in the same container network namespace, so the `localhost` redirect completes normally. ## Test plan - [ ] Build and deploy the updated image - [ ] Open a terminal in the VNC session - [ ] Run `claude` — it should open Chrome in the VNC window pointing to the Claude login page - [ ] Log in with a Claude Max account — OAuth should complete and `claude` should show as authenticated - [ ] Start Happy Coder — confirm it connects without complaining about auth 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.