Distrobox: Difference between revisions
(5 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
[https://distrobox.it Distrobox] offers you to use any linux distribution inside your terminal as a simple wrapper for Docker. | [https://distrobox.it Distrobox] offers you to use any linux distribution inside your terminal as a simple wrapper for [[Podman]], [[Docker]] or Lilipod. | ||
== Setup == | |||
Distrobox uses Docker internally to fetch and run system images. Easily get started by enabling Podman with Docker-compatibility mode.<syntaxhighlight lang="nix"> | |||
virtualisation.podman = { | |||
enable = true; | |||
dockerCompat = true; | |||
}; | |||
environment.systemPackages = [ pkgs.distrobox ]; | |||
</syntaxhighlight> | |||
== Usage == | == Usage == | ||
Setup container with latest [https://archlinux.org | Setup container with latest [https://archlinux.org Arch Linux] image | ||
<syntaxhighlight lang="console"> | <syntaxhighlight lang="console"> | ||
Line 9: | Line 19: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Enter | Enter Arch Linux container | ||
<syntaxhighlight lang="console"> | <syntaxhighlight lang="console"> | ||
Line 15: | Line 25: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
For further usage, please refer to the [https://distrobox.it/#distrobox Distrobox] documentation. | |||
== Tips and tricks == | |||
[[Category: | === Using different architecture === | ||
Following example will run an Ubuntu container with a different architecture than the host, in this case arm64. | |||
Add following line to your system configuration, apply it and then reboot the system.<syntaxhighlight lang="nix"> | |||
boot.binfmt.emulatedSystems = [ "aarch64-linux" ]; | |||
</syntaxhighlight>Run a Debian container with arm64 architecture<syntaxhighlight lang="nix"> | |||
sudo podman run --rm --privileged multiarch/qemu-user-static --reset -p yes | |||
distrobox create -n debian --image arm64v8/debian | |||
distrobox enter debian | |||
</syntaxhighlight> | |||
[[Category:Applications]] | |||
[[Category:Container]] | [[Category:Container]] |
Latest revision as of 16:13, 5 August 2024
Distrobox offers you to use any linux distribution inside your terminal as a simple wrapper for Podman, Docker or Lilipod.
Setup
Distrobox uses Docker internally to fetch and run system images. Easily get started by enabling Podman with Docker-compatibility mode.
virtualisation.podman = {
enable = true;
dockerCompat = true;
};
environment.systemPackages = [ pkgs.distrobox ];
Usage
Setup container with latest Arch Linux image
# distrobox create --name archlinux --init --image archlinux:latest
Enter Arch Linux container
# distrobox enter archlinux
For further usage, please refer to the Distrobox documentation.
Tips and tricks
Using different architecture
Following example will run an Ubuntu container with a different architecture than the host, in this case arm64.
Add following line to your system configuration, apply it and then reboot the system.
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
Run a Debian container with arm64 architecture
sudo podman run --rm --privileged multiarch/qemu-user-static --reset -p yes
distrobox create -n debian --image arm64v8/debian
distrobox enter debian