#7489: feat: add brew to Dockerfile
docker
Cluster:
Docker Enhancements and Fixes
This PR addresses #6065 and adding `Brew` installation step into Dockerfile.
<!-- greptile_comment -->
<h2>Greptile Overview</h2>
<h3>Greptile Summary</h3>
Adds a Homebrew installation into the runtime image by copying the `/home/linuxbrew/.linuxbrew` prefix from `homebrew/brew:4.6.20`, adjusting ownership before switching to the non-root `node` user, and prepending Homebrew’s `bin/` and `sbin/` to `PATH`.
This integrates into the existing Dockerfile’s “build everything as root, then drop privileges” approach, making `brew` available at runtime without compiling it in the image.
<h3>Confidence Score: 4/5</h3>
- This PR is likely safe to merge, but the Homebrew ownership path should be corrected to avoid runtime failures when running as `node`.
- The change is small and isolated to the Dockerfile, but the `chown` targets `/home/linuxbrew` rather than the actual copied prefix directory `/home/linuxbrew/.linuxbrew`, which can cause `brew` write operations to fail under the non-root user.
- Dockerfile (Homebrew prefix ownership and paths)
<!-- greptile_other_comments_section -->
<sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub>
<!-- /greptile_comment -->
Most Similar PRs
#8362: Add Homebrew-based Docker image
by bugparty · 2026-02-03
86.7%
#3324: Update Dockerfile to support Homebrew and Go for skill execution
by nnnet · 2026-01-28
85.4%
#5458: fix: set correct file ownership in Dockerfile (#5450)
by hakyonglee · 2026-01-31
79.6%
#11818: fix(docker): resolve build hang by using in-place ownership and opt...
by dilly · 2026-02-08
78.6%
#11576: Update Dockerfile, change file ownership during copy to prevent long …
by fastali · 2026-02-08
78.3%
#3513: fix(docker): add MOLTBOT_STATE_DIR to resolve permission error
by Suksham-sharma · 2026-01-28
75.9%
#8350: install gemini-cli inside docker container to allow for gemini-cli ...
by bpwned · 2026-02-03
75.7%
#3240: Fix Docker build failures on Windows/WSL environments
by Attili-sys · 2026-01-28
75.5%
#6631: fix: configure npm global prefix for non-root user in Docker
by tjetzinger · 2026-02-01
75.5%
#11333: fix(docker): align host directory ownership with container user
by liuxiaopai-ai · 2026-02-07
75.1%