toolbox icon indicating copy to clipboard operation
toolbox copied to clipboard

Add ability to mount volumes

Open stone-w4tch3r opened this issue 1 year ago • 3 comments

Is your feature request related to a problem? Please describe. I use toolbox in fedora silverblue. I want to install dotnet sdk into a toolbox and than expose it to host for using with IDE. I can call dotnet command using toolbox run, but I also need access on host to files of sdk that are installed into /usr/lib64/sdk/dotnet.

Describe the solution you'd like This can be solved with volumes: I will create /home/user/dotnet:/usr/lib64/sdk/dotnet mount and use it in my IDE

Describe alternatives you've considered I tried to mess with podman:

  • add volume to an existing toolbox (not possible)
  • create a new container from toolbox image (but to be usable toolbox must configure this container first, and I didn't figure out how to do this)
  • commit existing toolbox container and run a new one from this image (throws errors on starting and fails)

Additional context There was a PR #100 that can support this, but it was closed without implementation many years ago

stone-w4tch3r avatar Dec 01 '24 12:12 stone-w4tch3r

you and me both buddy, I just wanted to use scrcpy from inside a toolbox/podman container and I can't, I would really want to mount devices to an already created container, but Idk why that's not a feature by now (2025)

thepragandsensdiary avatar Jan 11 '25 01:01 thepragandsensdiary

I have a similar request, but for allowing to mount other partitions, beyond /home/<user>, inside the container.

Working with large source code base (kernel) take some space, and having it in a different partition, outside /home/<user> is not unusual, thus having the ability to map volumes on enter or create time would be really helpful.

bmeneg avatar Mar 18 '25 13:03 bmeneg

I use distrobox now, it's much more feature-rich, and it can do this

stone-w4tch3r avatar Mar 18 '25 21:03 stone-w4tch3r

Another use-case for this: mounting /run/secrets for subscription manager.

mattdm avatar Apr 17 '25 15:04 mattdm

Another use case: mount /nix from home :)

thrix avatar May 16 '25 20:05 thrix

Seems this fork quite nicely implements it.

https://github.com/containers/toolbox/compare/main...ray1729:toolbox:feature/container-create-extras

trevarj avatar Sep 09 '25 17:09 trevarj