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
9.66k stars 394 forks source link

[Suggestion] Install doas for Chimera containers #1166

Open PureTryOut opened 7 months ago

PureTryOut commented 7 months ago

Is your feature request related to a problem? Please describe.

I'm trying to create a container that uses Chimera Linux. That distribution doesn't have sudo available, but it does have doas instead (package name opendoas). Currently when using distrobox create --image docker.io/chimeralinux/chimera there is no way to elevate privileges inside the container.

Describe the solution you'd like doas to be installed by distrobox-init.

Describe alternatives you've considered I don't think packaging sudo for the distribution when they have clearly meant to use something else would be right :sweat_smile:

Additional context The distro uses apk as it's package manager like Alpine Linux, but it isn't Alpine Linux and any package there doesn't have to exist ( by that same name) in Chimera. Available packages can be found at https://pkgs.chimera-linux.org/packages

89luca89 commented 6 months ago

Hi @PureTryOut

There is a similar thing for Wolfi (also uses apk) where I just use su-exec and "alias" it to sudo

You can try with a pre-init-hook to create such wrapper, and test if that is enough, and if doas needs other setup (like with sudo, for nopasswd and stuff like that)

Then we can think of integrating it in the init