-
-
Notifications
You must be signed in to change notification settings - Fork 177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Brew packages installed on host are not available in container, even with host-exec #1294
Comments
brew by default is only added to PATH when the bash session is interactive, as default in #!/usr/bin/env bash
[[ -d /home/linuxbrew/.linuxbrew && $- == *i* ]] && eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
|
Another option is using the absolute path to brew binary (which is way better), you don't want scripts to use interactive mode distrobox-host-exec /home/linuxbrew/.linuxbrew/bin/brew |
This is still bugged; many packages in brew assume that they are available after being called. For example this will not work in a container, because the atuin init script calls
Nor does aliasing it work; these tools are setting necessary environment variables during init which seemingly don't propagate to the container's shell.
|
Well yeah, the point of containers is to prevent being affected by host dependencies. My best advice is simply installing brew inside the container. Other than that, I don't think anything else can be done without breaking container isolation. |
The point of containers in this context is to prevent the container from affecting the host. The existence of |
Not denying that, but I don't think it is intended to mix both. I would recommend installing these tools with the package manager the container image provides (apt if Ubuntu/debian, pacman for arch, etc). Also there are some workarounds that might help, like symlinking You can check https://distrobox.it/posts/execute_commands_on_host/ to see which option fits your needs |
Describe the bug
When you install something via brew in the host, you cannot access it inside a container, even by using
distrobox-host-exec
. It is simply not available in the PATH. Other host commands work as expected.What did you expect to happen?
distrobox-host-exec
should be able to run brew commands that the host can runOutput of
rpm-ostree status
Hardware
No response
Extra information or context
The text was updated successfully, but these errors were encountered: