[Request]: User-installed CLI plugins are lost on every container upgrade
- Dominant language
- Swift
- Stars
- 49.9k
- Forks
- 1.8k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 22
Description
CLI plugins installed into `{install-root}/libexec/container-plugins/` survive inside the current keg but get wiped when `container` is upgraded (Homebrew moves the symlink from `Cellar/container/0.12.3/` → `0.12.4/`, old keg gets cleaned).
Steps to reproduce (Homebrew, but applies to any package manager):
```bash
# Install a CLI plugin
mkdir -p /opt/homebrew/Cellar/container/0.12.3/libexec/container-plugins/myplugin/bin
cp my-plugin /opt/homebrew/Cellar/container/0.12.3/libexec/container-plugins/myplugin/bin/myplugin
chmod +x /opt/homebrew/Cellar/container/0.12.3/libexec/container-plugins/myplugin/bin/myplugin
cat > /opt/homebrew/Cellar/container/0.12.3/libexec/container-plugins/myplugin/config.toml << 'EOF'
abstract = "my plugin"
author = "me"
EOF
container myplugin # works
brew upgrade container # keg rotates
container myplugin # Plugin 'container-myplugin' not found.
```
Docker solves this with `~/.docker/cli-plugins/` — a stable, user-writable directory that survives Docker upgrades. Could `container` search a similar path?
Proposal: add a fourth search directory to `PluginLoader` that's outside the versioned keg, e.g.:
- `~/.config/container/plugins/`
- `~/.local/lib/container/plugins/`
- `$XDG_DATA_HOME/container/plugins/`
Priority would be: user plugins dir (new, highest) → install-root plugins → app-bundle plugins. Same `config.toml` + `bin/` layout as existing plugins. No changes to the plugin format or daemon plugin registration.
This is the main blocker for shipping a Homebrew-distributed compose plugin — right now every `brew upgrade container` silently breaks `container compose`.
container 0.12.3, macOS 26.3, Homebrew.
Contributor guide
Assessment
This issue has not been assessed yet.