-
-
Notifications
You must be signed in to change notification settings - Fork 14.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Toolbox #96115
Comments
I took a brief look at this a couple of months ago after it was rewritten in go. I'll post what I had if I can find it. It uses meson/ninja as a build system which makes it kind of non-standard and a bit awkward to package compared to other go projects, might be easier to skip it and specify the build/install phases manually. IIRC it also needed completion/profile.d paths to be patched in, had issues trying to mount other paths on NixOS and it wanted flatpak for some reason. |
I also took a shot at getting toolbox working a while back, and wrote a nix expression for building the package, but decided to try it out when podman is rolled out in a stable NixOS channel. Now that 20.09 is released, I'm trying it out but I get cryptic errors like the following:
I might look into this further when I get the time, but people are welcome to look into this issue to try and fix it. Meanwhile, here's the nix expression to build it: https://github.com/mt-caret/nix-config/blob/55ca5a343feec9c0cdef9d6a035ac9e99d1d0208/packages/toolbox.nix {
virtualisation.podman.enable = true;
services.flatpak.enable = true;
xdg.portal.enable = true;
} People seem to be against usage of buildGoModule (see #84826), so if people are interested in seeing this in nixpkgs, someone probably needs to port this to buildGoPackage. |
Hi @mt-caret , I modified a little your nix expression https://github.com/tfmoraes/nixoscfg/blob/main/overlays/pkgs/toolbox/default.nix I added a patch to check if I'm having the same error. So I tried to start the container using podman, this way:
Maybe the problem now is because o cgroups. I don't now. |
I had to submit an upstream patch to fix an error introduced in newer builds with ownership of the toolboxRuntimeDirectory. I think this would be good to have, so I'm interested in carrying on the work. I was able to build toolbox (thanks for the derivation). The biggest issue seems to be this. Trying to start a container with
See this issue. Seems that the reported issue occured when host and container glibc don't match. The toolbox binary gets bind-mounted into the fedora container, which may cause issues without the requisite store paths also being mounted. See:
Toolbox is kinda leaky by design, so this might be a problem. Container infoWARN[0000] Error initializing configured OCI runtime kata: no valid executable found for OCI runtime kata: invalid argument DEBU[0000] using runtime "/nix/store/jkg2hzkxc2g05gsbpkb8sybh34j78syh-nvidia-podman/bin/nvidia-container-runtime" INFO[0000] Setting parallel job count to 73
DEBU[0000] Called inspect.PersistentPostRunE(/nix/store/h9was55f3ir6b2sq5vc96cpgns3qbfz0-podman-2.2.1/bin/podman --log-level debug inspect --format json --type container fedora-tool |
I have it running! Hello from vim installed via dnf. It's blocked by my upstream patch which you can follow here: containers/toolbox#675 |
That's great @mjlbach!!! I think toolbox is a great tool to have in NixOS. |
Agreed! Please test the PR if you have time :) Thanks for your work! |
Very happy to see your interest in Toolbox!
I just wanted to point out that Toolbox doesn't actually need Flatpak proper. It's just the Anyway, good news is that these days, since Toolbox 0.0.97, the |
Just a minor note. The actual issue is containers/toolbox#529 See the related commit for an explanation on how we solved it. Ideas for better solutions welcome. :) |
I marked this as stale due to inactivity. → More info |
This issue is important to me. |
Any update on this? Can this be merged to upstream and closed? |
Is there anything that you need from the Toolbx project? |
There are two remaining roadblocks. To clarify, I no longer use nixos and will probably not work on this (I still am an active toolbox user, just on Fedora :))
Anyone is free to takeover #110473, I won't be continuing it. The PR "works" with the caveat of point 1 not being handled, so you'll have to periodically recreate toolboxes. |
@debarshiray after the container creation, it's possible to change the bind mounts and ports? Is there a file to edit? |
I found this alternative to toolbox https://github.com/89luca89/distrobox |
There's no support for doing it easily through a Toolbx-specific configuration file at the moment. However, you can script something through one of the shell start-up scripts. |
Project description
It's a tool to create pet-container using Podman. The container is fully mutable and maps your user home to the container.
Metadata
The text was updated successfully, but these errors were encountered: