Accessing host filesystem from a custom-image toolbox?

Hi. If I attempt to run ls from a Toolbox built with a toolbox base image, it works:

$ toolbox create -i f39tbx
Created container: f39tbx
Enter with: toolbox enter f39tbx

$ toolbox run -c f39tbx ls
... # SUCCESS!

However if I try the same with a standard Fedora base image (not the fedora-toolbox one, it stops working:

$ toolbox create -i f39
Created container: f39
Enter with: toolbox enter f39

$ toolbox run -c f39 ls
Error: failed to initialize container f39

What’s special about the fedora-toolbox image, and how can I build images based on non-toolbox images?

Toolbx environments have seamless access to the user’s home directory, the Wayland and X11 sockets, networking (including Avahi), removable devices (like USB sticks), systemd journal, SSH agent, D-Bus, ulimits, /dev and the udev database, etc…
For more info you can look GitHub - containers/toolbox: Tool for interactive command line environments on Linux.

You can look Toolbx Custom Images and GitHub - toolbx-images/images: Community maintained container images to use with toolbx and distrobox.

1 Like

Added toolbx

@hricky thanks for the reply, particularly the link to the community maintained images, I didn’t know existed. It’s really helpful.

I found the exact answer to my question in another Question

I think we can safely close this one as Duplicate.

For reference, here’s the solution:

There is a toolbox-support meta-package that includes the minimal packages required for toolbox.

$ dnf rq --requires toolbox-support