Distrobox-like container

This week I have been trying out Aeon Desktop and Bluefin Project. Nice OSs for desktops and I have been trying out Distrobox. My desktop use case, for example, is to use megacmd to fetch my remote files, but mega likes to install its own repository, and I don’t want it to mess with my main system repository locations. Distrobox does this nicely for me, but I think containers don’t start up automatically when the system boots.

I’ve been wondering on how to do the same with incus for a desktop now. How can I have an incus container have access to my home folder, my user, keep the container unprivileged and have a mapping between my uid and gid between the container and my host system.

I’ll study a bit on how to do this, but if anyone already knows how, it would be very helpful.

One option is to write a sysemd unit that starts up your distrobox container at boot. That is probably the quickest way of doing it.

use this profile to have a mapping between your uid and gid:

config:
  raw.idmap: |-
    uid 1000 1000
    gid 1000 1000

use this profile to mount your home folder:

devices:

  homefolder:

    type: disk

    source: /home/username/

    path: /home/username/
1 Like

It’s what I’m trying to figure out now. Trying all different ways of doing it to see which one I like best. But since it’s the first time using distrobox, I still have much to study and learn.

Thanks a lot!

I think I did similar things 3 to 4 years ago and just didn’t remember. I know it’s possible but it takes a little studying and fiddling to figure out.

In that case, you are in for a treat. It is really nice and at least on debian it uses podman.

Here is a short introduction to running containers using podman and systemd.

So when distrobox creates a box it is actually creating a podman container. Then you have all the cool tooling around podman.

Further reading:

2 Likes