Distrobox

From Alpine Linux
Revision as of 14:03, 28 October 2025 by John3-16 (talk | contribs) (1. Reworded introduction to complement the link's description further; 2. Updated electron package names; 3. Added --enable-features=UseOzonePlatform,WaylandWindowDecorations flag to run electron v.38 packages; 4. Style and grammar amendments.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Distrobox is a container wrapping layer that uses a container such as Podman, Docker, etc., to run your choice of Linux distribution or GUI apps (both Wayland and X11) from a terminal while enabling the use of the user's $HOME directory and external USB devices and storage. It runs on the Linux kernel natively. As a launcher of containers, it is distinct from WebAssembly (Wasm).

Installation

Installing the distrobox package automatically installs Podman as a dependency upon issuing the command:

# apk add distrobox

Running graphical programs

Configure Podman to run in rootless mode.

Create a container using an image of your choice. Here, Debian is installed using the command:

$ distrobox create --name my-debian --image debian $ distrobox enter my-debian

When Wayland desktop environments like Sway run without xwayland on the Alpine Linux host, electron apps such as code-oss, vscodium, or chromium, etc., need to be started as follows:

$ distrobox enter my-debian -- code --enable-features=UseOzonePlatform,WaylandWindowDecorations --ozone-platform=wayland

If you are running an X11 desktop, it may also be necessary to allow X authorization in order for GUI programs to work:

$ xhost +si:localuser:$USER

Troubleshooting

See also