606c2da224
If the last command that was run interactively inside the toolbox container had returned with a non-zero return code, then exiting the toolbox would trigger the fallback to /bin/bash, just like it would happen if $SHELL was missing from the toolbox. This is because 'podman exec ...' relays the return code of the last command. Therefore, don't rely on the return code of 'podman exec ...' and check the availability of $SHELL upfront. This does leave it vulnerable to races caused by the availability of $SHELL changing between the check and the actual attempt to use it. However, file I/O is inherently racy, and this is better than a spurious fallback. Keep the name of the default interactive shell localized to 'enter' by using a subshell because 'local' is not mandated by POSIX. |
||
---|---|---|
images/fedora | ||
COPYING | ||
fedora-toolbox | ||
fedora-toolbox-sudo | ||
meson.build | ||
NEWS | ||
README.md |
Fedora Toolbox — Hacking on OSTree-based Fedoras
Fedora Toolbox is a tool that offers a familiar RPM based environment for developing and debugging software on locked down OSTree based Fedora systems like Silverblue. Such operating systems are shipped as immutable OSTree images, where it's difficult to setup a development environment with your favorite tools, editors and SDKs. A toolbox container solves that problem by providing a RPM based mutable container. You can tweak it to your heart's content and use DNF to install your favorite packages, all without worrying about breaking your operating system.
The toolbox environment is based on the fedora-toolbox
image. This image is
then customized for the current user to create a toolbox container that
seamlessly integrates with the rest of the operating system.
Usage
Create your Fedora Toolbox container:
[user@hostname fedora-toolbox]$ ./fedora-toolbox create
[user@hostname fedora-toolbox]$
This will create a container, and an image, called
fedora-toolbox-<your-username>:<version-id>
that's specifically customised
for your host user.
Enter the Toolbox:
[user@hostname fedora-toolbox]$ ./fedora-toolbox enter
🔹[user@toolbox ~]$