feat: replace custom auto-install shim with mise for on-demand tools#6
Merged
Conversation
gabemeola
commented
Jun 24, 2026
Member
- Add mise config (mise-config.toml) with pre-approved tools via brew backend
- Install mise in builder stage, pre-install tools, copy to final
- Set MISE_DATA_DIR=/opt/mise (outside home, not shadowed by volume)
- Enable always_install setting for auto-install on first use
- Add mise activation to .bashrc
- Remove old brew-auto-install.conf and brew-install-handler.sh
- Remove gh from apt install (now managed by mise via brew)
- Add mise config (mise-config.toml) with pre-approved tools via brew backend - Install mise in builder stage, pre-install tools, copy to final - Set MISE_DATA_DIR=/opt/mise (outside home, not shadowed by volume) - Enable always_install setting for auto-install on first use - Add mise activation to .bashrc - Remove old brew-auto-install.conf and brew-install-handler.sh - Remove gh from apt install (now managed by mise via brew)
…rew as opencode user - MISE_INSTALL_PATH (not MISE_INSTALL_DIR) is the correct env var - Pre-install gh/glab via sudo -u opencode brew instead of mise install (builder runs as root, brew is owned by opencode) - Remove mise settings set; use MISE_ALWAYS_INSTALL=1 env var instead - Add HOMEBREW_NO_AUTO_UPDATE=1 to brew install in builder
- HOMEBREW_INSTALL_FROM_API=1 lets brew install any formula via JSON API without needing a local tap, so we can strip the entire homebrew-core (saves ~20MB) - brew install at runtime works for any formula, including ones added to homebrew-core after the image was built - No git operations needed, so .git removal is no longer relevant
- Keep homebrew-core with .git intact (brew update requires it) - Remove HOMEBREW_INSTALL_FROM_API=1 (no longer needed with local tap) - Keep other size optimizations (test, cask, portable-ruby, gem cache)
With HOMEBREW_INSTALL_FROM_API=1: - brew update downloads API JSON (fast, no git needed) - brew install fetches formula metadata from API cache - brew install works for any formula immediately - Homebrew-core tap can be stripped entirely (saves ~100MB) This is actually better than keeping the local tap.
… mise - Remove ruby, wget, jq, ripgrep, fd-find, vim-tiny, nano from apt - Keep portable-ruby (brew needs it with system ruby removed) - Move brew install gh glab before stripping homebrew-core tap - Add all moved tools to mise-config.toml - Update README tables and notes
Contributor
Docker image size comparison
|
…-iscsi and .deb cache
…requires it at startup)
…efixed tools like brew:gh)
…stall with MISE_ALWAYS_INSTALL=1)
…hims dir to PATH via ENV
…t manage/delete them
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.