Skip to content

[Request]: User-installed CLI plugins are lost on every container upgrade #1617

Open

Description

@Cyb3rDudu

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):

# 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.

Activity

  1. changed the title [-]User-installed CLI plugins are lost on every container upgrade[/-] [+][Request]: User-installed CLI plugins are lost on every container upgrade[/+] on May 29, 2026
  2. self-assigned this
    on Jun 1, 2026
  3. Cyb3rDudu commented on Jun 22, 2026

    @Cyb3rDudu
    Author

    Sorry for pushing. Any update on this? Is this a addition we can get?

  4. andrew-waters commented on Sep 16, 2026

    @andrew-waters

    A concrete instance of this, in case it helps make the case.

    I maintain compose, which installs as a container CLI plugin, and Orchard, which offers to install it for you. Because of this issue, the install flow has to warn people that upgrading container will silently remove what they just installed, and the app has to keep re-detecting it afterwards. The failure mode for anyone who installs by hand is worse: container compose simply stops existing one day, through no fault of theirs, with nothing to tell them why.

    A stable, user-writable plugin directory outside the keg, as the ~/.docker/cli-plugins comparison in the issue suggests, would resolve it for every plugin rather than each of us papering over it separately.

  5. jglogan commented on Nov 13, 2026

    @jglogan
    Contributor

    @Cyb3rDudu @andrew-waters Holy cow, I only now saw this. It got lost in the WWDC crush.

    From what I can see the problem is with the public homebrew package, which we do not maintain. You'll need to create an issue against it.

    container already supports separate locations for plugins built into the distribution and plugins from other packages.

    If INSTALL_ROOT is the path that corresponds to paths.installRoot in container system status:

    • ${INSTALL_ROOT}/libexec/container/plugins is where container looks for built-in plugins
    • ${INSTALL_ROOT}/libexec/container-plugins is where container looks for third-party plugins

    The package recipe for Homebrew container should not touch container-plugins.

    It should remove ${INSTALL_ROOT}/libexec/container when the package is uninstalled.

    Let's keep this open for a bit and I'll do my best to answer any follow-up questions on this.

  6. adrum commented on Nov 14, 2026

    @adrum

    I submitted Homebrew/homebrew-core#325534 which should resolve this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions