Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make it available inside the toolbox container
Commit 5b3d234 had made the toolbox script work inside a toolbox container, but most people didn't get to use it because it needed extra effort to get access to the script inside the container. One either had to grab the Toolbox sources or had to install the RPM. Both options were inconvenient - the former needed knowing too many technical details, while the latter would drag in dependencies like Buildah and Podman that don't work inside the toolbox container. This makes it easier to use the toolbox script inside a toolbox container by bind mounting the script from the host inside the container and keeping track of the path using the TOOLBOX_PATH environment variable. The environment variable ensures that running 'toolbox create' from inside a toolbox container would continue to bind mount the same script from the host that was used to create the current container and is available inside it. Compatibility with existing toolbox containers is broken when using the script within a container because it insists on the TOOLBOX_PATH environment variable being set inside. This might not be that big of a deal because using the toolbox script inside a toolbox container wasn't very convenient, and hence likely not used widely. In case of complaints, this can be relaxed by falling back to "$0" when forwarding the command to the host, but unless that happens it's better to keep things simple to avoid a larger test matrix. Based on an idea from Colin Walters. https://github.com/debarshiray/toolbox/pull/126
- Loading branch information