cancel
Showing results for 
Search instead for 
Did you mean: 
HerveQ
Flight Engineer Flight Engineer
Flight Engineer
  • 23 Views

Toolbx for Development and Test environments

I discovered Toolbx (no "o" in "box") a while back when I was looking for a solution to stop cluttering my system with development packages.
With Toolbx, you can create development environments insulated from the host system.


Toolbx is using containers with Podman, but instead of creating immutable insulated containers, it uses mutable containers that have some access to your system, such as your home directory, the graphical interface, and the network.
This means that you can install packages in a Toolbx environment, transparently access files in your home directory, and start graphical tools from inside the environment.

You install Toolbx on your system by installing the toolbox RPM package (although the project name is Toolbx, the package and the command names are toolbox

root@rhel10:~# dnf install toolbox

Toolbx is available since RHEL 8.5.

You create environments by using the toolbox create name command.
The first time you run the command, the toolbox image is pulled:

student@rhel10:~$ toolbox create mybox
Image required to create Toolbx container.
Download registry.redhat.io/ubi10-beta/toolbox ( ... MB)? [y/N]: y
Created container: mybox
Enter with: toolbox enter mybox

You enter your environment by using the toolbox enter name command:

student@rhel10:~$ toolbox enter mybox

Welcome to the Toolbx; a container where you can install and run
all your tools.

- To create a new tools container, run 'toolbox create'.

⬢ [student@toolbx ~]$

From there, you can install packages:

⬢ [student@toolbx ~]$ sudo dnf install gcc pip flatpak

Notice that the sudo configuration inside the container grants you access to the container's root account.
You don't need such access on the host system: you have full control of your Toolbx environments even if you have no root access on the host system.

You can also install pip packages:

⬢ [student@toolbx ~]$ sudo pip install ansible

And you can install and start graphical tools:

⬢ [student@toolbx ~]$ flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
⬢ [student@toolbx ~]$ flatpak install org.gnome.meld
⬢ [student@toolbx ~]$ flatpak run org.gnome.meld

Star Meld from ToolbxStar Meld from Toolbx

You can list and delete your Toolbox environments:

student@rhel10:~$ toolbox list
IMAGE ID IMAGE NAME CREATED
6945bb77191f registry.redhat.io/ubi10-beta/toolbox:latest 10 days ago

CONTAINER ID CONTAINER NAME CREATED STATUS IMAGE NAME
5c347106d26c devpython 47 hours ago created registry.redhat.io/ubi10-beta/toolbox:latest
5a0253a519f4 devrust 47 hours ago exited registry.redhat.io/ubi10-beta/toolbox:latest
79478a93ec85 mybox 47 hours ago exited registry.redhat.io/ubi10-beta/toolbox:latest

student@rhel10:~$ toolbox rm --force mybox

As a bonus, the new GNOME terminal in RHEL 10, Ptyxis, knows about containers and enables you to enter your Toolbx environments from the menu, without having to use the toolbox command:

rhel10.png

References:

 

 

 

Labels (3)
0 Kudos
0 Replies
Join the discussion
You must log in to join this conversation.