Distrobox: Difference between revisions

From Alpine Linux
(moved content from Software management page to seperate page)
 
(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.)
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[https://distrobox.it/ Distrobox] allows running any Linux distribution inside your terminal. Distrobox uses [[Podman]], [[Docker]] etc.. to create containers using the Linux distribution of your choice. This enables both backward and forward compatibility with software and freedom to use whatever distribution you’re more comfortable with.
[https://distrobox.it/ 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 {{Path|$HOME}} directory and external USB devices and storage. It runs on the Linux kernel natively.  As a launcher of containers, it is distinct from [https://webassembly.org/ WebAssembly (Wasm)].


Installing {{pkg|distrobox}} package automatically installs [[Podman]] as a dependency, on issuing the command:{{cmd|# apk add {{pkg|distrobox}}}}
== Installation ==
 
Installing the {{pkg|distrobox}} package automatically installs [[Podman]] as a dependency upon issuing the command:
{{cmd|# apk add {{pkg|distrobox}}}}
 
== Running graphical programs ==


Configure Podman to run in [[Podman#Running in rootless mode|rootless mode]].  
Configure Podman to run in [[Podman#Running in rootless mode|rootless mode]].  


Create a container using an image of your choice. Here Debian is installed using the command:{{cmd|$ distrobox create --name my-debian --image debian
Create a container using an image of your choice. Here, Debian is installed using the command:
{{cmd|$ distrobox create --name my-debian --image debian
$ distrobox enter my-debian}}
$ distrobox enter my-debian}}


When [[Wayland]] desktop like [[Sway]] runs without {{pkg|xwayland}} on the Alpine Linux host, electron apps like {{ic|vscode}}, {{ic|google-chrome}} etc needs to be started as follows:{{ic|<nowiki>$ distrobox enter my-debian -- code --ozone-platform=wayland</nowiki>}}.
When [[Wayland]] desktop environments like [[Sway]] run without {{pkg|xwayland}} on the Alpine Linux host, electron apps such as {{pkg|code-oss}}, {{pkg|vscodium}}, or {{pkg|chromium}}, etc., need to be started as follows:
{{cmd|<nowiki>$ distrobox enter my-debian -- code --enable-features=UseOzonePlatform,WaylandWindowDecorations --ozone-platform=wayland</nowiki>}}
 
If you are running an '''X11''' desktop, it may also be necessary to allow '''X''' authorization in order for GUI programs to work:
{{cmd|$ xhost +si:localuser:$USER}}
 
== Troubleshooting ==


If you are running X11 desktop, it may also be necessary to allow X authorization for GUI programs to work: {{ic|$ xhost +si:localuser:$USER}}


== See also ==
== See also ==
Line 17: Line 28:
* [[Podman]]
* [[Podman]]
* [[Docker]]
* [[Docker]]


[[Category:Virtualization]]
[[Category:Virtualization]]

Latest revision as of 14:03, 28 October 2025

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