89luca89 / distrobox

Use any linux distribution inside your terminal. Enable both backward and forward compatibility with software and freedom to use whatever distribution you’re more comfortable with. Mirror available at: https://gitlab.com/89luca89/distrobox
https://distrobox.it/
GNU General Public License v3.0
10.1k stars 417 forks source link

supporting snaps (and by implication systemd) inside of containers #510

Closed Danathar closed 1 year ago

Danathar commented 2 years ago

I don't like snaps because of the daemon dependency, but unfortunately Canonical has a lot of weight. I went to install authy from twillo in a container (2 factor auth app) and found it was ONLY available as a snap.

This poses a problem. Both distrobox and (and toolbox) don't support running daemons with systemd. Snaps require snapd to be running before you can install a snap.

IS there any clean way of getting an internal systemd running inside a container of distrobox? There doesn't seem to be. This problem isn't going away. We can expect more and more places to support snap. They may or may not include flatpaks or the repositories.

pulkitkrishna00 commented 2 years ago

You can run containers with systemd. Just add the --init option:

distrobox create --init --image ubuntu:22.04

But snaps will not work anyway. See #324.

pulkitkrishna00 commented 2 years ago

And Authy is available in the AUR: https://aur.archlinux.org/packages/authy. You can make an Arch container and install in it. It is probably also available as pre-built package from chaotic-aur: https://aur.chaotic.cx/.

Danathar commented 2 years ago

You can run containers with systemd. Just add the --init option:

distrobox create --init --image ubuntu:22.04

But snaps will not work anyway. See #324.

Thanks. I followed the bug and read messages. Nasty. I can understand now why it's so difficult.

Danathar commented 2 years ago

And Authy is available in the AUR: https://aur.archlinux.org/packages/authy. You can make an Arch container and install in it. It is probably also available as pre-built package from chaotic-aur: https://aur.chaotic.cx/.

I'll take a look at that, Arch to the rescue!

89luca89 commented 1 year ago

Like already wrote in #462

Running flatpaks (and snaps) inside distrobox is not an intended use-case, running them will require a separate init as already suggested

I'll leave this open if someone wants to investigate and maybe find a solution, but don't expect for it to be supported soon

89luca89 commented 1 year ago

As of now, snapd inside init+root container works

Still not ideal, not advisable, and I'll not accept bugs for this image

Danathar commented 1 year ago

As of now, snapd inside init+root container works

Still not ideal, not advisable, and I'll not accept bugs for this image

Thanks for this. I agree with you conceptually, but there are some distros that still use init instread of systemd and thus does help in those situations where only a snap is available