Skip to content

fix: install sudo so agent-browser --with-deps can run apt-get#69

Closed
hilr wants to merge 1 commit into
mainfrom
quick-sort/fix/dockerfile-install-sudo
Closed

fix: install sudo so agent-browser --with-deps can run apt-get#69
hilr wants to merge 1 commit into
mainfrom
quick-sort/fix/dockerfile-install-sudo

Conversation

@hilr

@hilr hilr commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

The image build fails at agent-browser install --with-deps (line 35 of the Dockerfile):

Running: sudo apt-get update
⚠ Could not run apt-get update: No such file or directory (os error 2)
...
✗ Failed to install system dependencies: could not run install command: No such file or directory (os error 2)

python:3.12-slim does not ship sudo, so agent-browser's sudo apt-get ... invocations fail with ENOENT. Install sudo in the second apt-get list (the one that already pulls in gh/openssh-client/docker-ce-cli).

Unrelated to #68 (git-lfs) — that one touches line 9, this one touches line 30, so they merge cleanly.

Test plan

  • Dockerfile diff is one token added to an existing apt-get install line
  • rebuild the image and confirm agent-browser install --with-deps completes

🤖 Generated with Claude Code

The python:3.12-slim base image ships without sudo. agent-browser's
install --with-deps shells out to `sudo apt-get update` / `sudo apt-get
install -y ...` for browser system deps, and the spawn failed with
ENOENT, breaking the image build at that step.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@hilr

hilr commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator Author

不需要装 sudo——构建那步本身是 root,--with-deps 却硬调 sudo apt-get 是多余的。改去掉 --with-deps(Dockerfile 已手动装了浏览器要的库)。

@hilr hilr closed this Jun 22, 2026
@hilr hilr deleted the quick-sort/fix/dockerfile-install-sudo branch June 22, 2026 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant