Distrobox: Difference between revisions

From Alpine Linux
(created headings)
No edit summary
Line 15: Line 15:


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}}
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}}
== Troubleshooting ==
=== Permission problems with rootless Podman ===
You may encounter an error when entering your rootless container:
<code>Error: unable to start container "XYZ": runc: runc create failed: unable to start container process: unable to apply cgroup configuration: rootless needs no limits + no cgrouppath when no permission is granted for cgroups: mkdir /sys/fs/cgroup/XYZ: permission denied: OCI permission denied</code>
This problem may be solved by installing {{Pkg|crun}}: {{Cmd|# apk add crun}}
and recreating your container.


== See also ==
== See also ==
Line 21: Line 33:
* [[Podman]]
* [[Podman]]
* [[Docker]]
* [[Docker]]


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

Revision as of 19:39, 22 September 2025

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.

Installation

Installing distrobox package automatically installs Podman as a dependency, on 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 like Sway runs without xwayland on the Alpine Linux host, electron apps like vscode, google-chrome etc needs to be started as follows:$ distrobox enter my-debian -- code --ozone-platform=wayland.

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

Troubleshooting

Permission problems with rootless Podman

You may encounter an error when entering your rootless container:

Error: unable to start container "XYZ": runc: runc create failed: unable to start container process: unable to apply cgroup configuration: rootless needs no limits + no cgrouppath when no permission is granted for cgroups: mkdir /sys/fs/cgroup/XYZ: permission denied: OCI permission denied

This problem may be solved by installing crun:

# apk add crun

and recreating your container.

See also