I have a need for an Ubuntu 22 based distrobox but it’s not obvious if anything like that is available in ghcr.io/ublue-os. I tried building my own based on the the Canonical official container images but that seems to be missing some of the host-integration pieces that are in the ublue-os repo.
Is my best choice to clone that repo, change the base image, and rebuild? Then just push to my namespace on ghcr.io?
You may need to adjust the packages if something isn’t in 22.04 but I think you should be good. The boxkit repo contains all the github actions to push to ghcr.io, etc, so that should be all set up, all you need to do is generate a new keypair for signing, which is covered in the readme. That should be it!
There are some applications I use, that do not have flatpaks. Examples are TWS and Citrix.
I would like to have a custom toolbox where they are pre-installed, and export their launchers on the host so that I can use them without layering packages on the host.
Agreed. I managed to get my custom Ubuntu box built and running. Thanks all for the help.
I have two open items I want to implement:
Can I use my custom box as the default for the Ubuntu-Toolbox? I deleted all the old toolbox bits but after a reboot it seems to have been created again with the default image.
Is it possible to automatically do a “distrobox-export” for specific applications?
For (2), look at line 10 of my script for building distrobox. My solution was to run the export command from inside the box, after it has been created. I don’t know if there is some better way of doing this, but this worked for me. Notably, toolbox does not have a way of doing the same so I created an export-tbox.sh script, though as I write in the README.md, I’m sure that someone has a proper script for doing this (mine works with the specific application). I’ve made a note to look for something along those lines when I get some time…
I was not able to edit the ptyxis profiles due to this issue. But I was able to swap in my image by editing the /etc/containers/systemd/users/ubuntu-toolbox.container file.
As for automatically exporting, your script assumes the container image is being generated on the host you want the app exported to but I’m building on a separate Ubuntu build machine. I guess for now I’ll have to do the manual steps.
For the application export though, it doesn’t really matter where you build your image. The export action is done from a container (not an image) to the host running that container. So you create from any image (wherever it came from), then create a container anywhere else (though that would require downloading the image to that host).
Either way, once you have a container, just use the command I referenced to enter the container and have it export the app (from the container to the host running it). It does not have to be part of the script that builds the image.