IMHO those two technologies are not directly comparable, as they serve different purposes.
Toolbox is based on Podman, which essentially gives you a complete independent container for running applications in a constrained way. In the toolbox scenario, the application in question is a interactive shell.
Brew on the other hand provides the host system with commands not shipped with the host system. They build the applications in a way that they have very little dependencies on the available libraries on the host. It was originally developed for Mac OS X, as it’s essentially a UNIX based system without many of the tools, UNIX users are used to.
IMHO both technologies are best used together for different tasks and requirements. Personally, i use Brew to spice up the host system with various commands i need, but are not available OOB in EOS and Podman to run different development environments for my professional use.
As this may be useful for others going a similar route, there’s a huge drawback in Podman: After a container has been created, it’s configuration can’t be changed (easily). If for example you pass in device nodes during creation and those device nodes change, the container will no longer start. You have to export the container filesystem, recreate the container and import the formerly exported filesystem. A example of this:
podman run --name ${NAME} \
--tty \
--interactive \
--env DISPLAY \
--volume /tmp/.X11-unix:/tmp/.X11-unix \
--volume /etc/localtime:/etc/localtime:ro \
--volume ${HOME}:/mnt \
--security-opt seccomp=unconfined \
--annotation run.oci.keep_original_groups=1 \
--device /dev/dri/card0 \
--device /dev/bus/usb \
${OPT_PARAMS} \
${IMAGE} \
/bin/bash
In the above case, i pass the entire USB bus into the container during creation. As soon as the USB configuration of the host changes (e.g. move the USB mouse to another port) the container won’t run anymore. The reason for this odd behavior is, that Podman in general isn’t meant to provide long running containers which host a entire operating system for a long period of time. Normally, containers are created on-demand for running a specific application within a specific containerized os version (like a NGINX webserver on a Ubuntu 22.04 instance during startup of the host)