Repository navigation
Conversation
Plugins installed into the versioned install root are lost on every container upgrade (e.g. brew upgrade rotates Cellar/container/0.12.3 → 0.12.4, taking libexec/container-plugins/ with it). Add a fourth search directory to PluginLoader that is stable across upgrades: XDG_DATA_HOME/container/plugins/ (falls back to ~/.local/share/container/plugins/). The directory is opt-in — it must exist before container will scan it, so users are not surprised. User-home plugins take priority over install-root plugins, so package-managed installs cannot silently shadow plugins the user installed themselves. Search order is now: user-home → install-root → app-bundle. Closes apple#1617
Author
|
@jglogan any updates on this. Sorry for bumping :) |
adrum
added a commit
to adrum/Container-Compose
that referenced
this pull request
Nov 14, 2026
…ainer plugin
Apple's `container` dispatches an unknown subcommand `compose` to a CLI
plugin at <pluginsDir>/compose/{bin/compose, config.toml}, where the
binary name must match the directory and config.toml must omit
servicesConfig to be treated as CLI rather than a daemon. There is no
metadata handshake — the binary is simply execvp'd — so a symlink plus a
manifest is sufficient.
install-plugin creates that layout, symlinking the binary (preferring the
stable PATH copy so it survives container-compose upgrades). It defaults
to installing into both the user-level dir
($XDG_DATA_HOME/container/plugins, falling back to ~/.local/share/...,
matching apple/container#1618) and the install-root keg, so
`container compose` works on current releases and survives `container`
upgrades. The command is idempotent and re-runnable, and supports
--location, --plugin-dir, --binary, --install-root, and --uninstall.
adrum
added a commit
to adrum/Container-Compose
that referenced
this pull request
Nov 25, 2026
…ainer plugin
Apple's `container` dispatches an unknown subcommand `compose` to a CLI
plugin at <pluginsDir>/compose/{bin/compose, config.toml}, where the
binary name must match the directory and config.toml must omit
servicesConfig to be treated as CLI rather than a daemon. There is no
metadata handshake — the binary is simply execvp'd — so a symlink plus a
manifest is sufficient.
install-plugin creates that layout, symlinking the binary (preferring the
stable PATH copy so it survives container-compose upgrades). It defaults
to installing into both the user-level dir
($XDG_DATA_HOME/container/plugins, falling back to ~/.local/share/...,
matching apple/container#1618) and the install-root keg, so
`container compose` works on current releases and survives `container`
upgrades. The command is idempotent and re-runnable, and supports
--location, --plugin-dir, --binary, --install-root, and --uninstall.
This branch has not been deployed
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.
CLI plugins installed into
{install-root}/libexec/container-plugins/are lost on everycontainerupgrade because the path lives inside the versioned keg (e.g. Homebrew rotatesCellar/container/0.12.3/→0.12.4/).Add a fourth search directory to
PluginLoaderthat is stable across upgrades:XDG_DATA_HOME/container/plugins/(falls back to~/.local/share/container/plugins/). The directory is opt-in — it must exist beforecontainerwill scan it.User-home plugins take priority over install-root plugins, so a package-manager upgrade cannot silently shadow plugins the user installed themselves. Search order is now: user-home → install-root → app-bundle.
Closes #1617