notes/devops/container/box/distrobox.txt
Ihar Hancharenka 509a193a2f m
2025-02-11 11:37:49 +03:00

254 строки
9.5 KiB
Plaintext

https://distrobox.it/
https://distrobox.it/compatibility/
https://distrobox.it/compatibility/#host-distros
https://distrobox.it/compatibility/#containers-distros
NixOS is not a supported container distro, and there are currently no plans to bring support to it.
If you are looking for unprivileged NixOS environments, we suggest you look into nix-shell or nix portable
https://github.com/89luca89/distrobox/blob/main/docs/compatibility.md
https://distrobox.it/useful_tips/
https://distrobox.it/posts/posts/
https://distrobox.it/posts/integrate_vscode_distrobox/
https://distrobox.it/posts/run_libvirt_in_distrobox/
https://distrobox.it/posts/run_latest_gnome_kde_on_distrobox/
https://distrobox.it/featured_articles/
https://github.com/89luca89/distrobox
https://gitlab.com/89luca89/distrobox
apt/distrobox
pacstall/distrobox
dnf/distrobox
suggested packages:
containers-storage docker-compose
recommended packages:
netavark buildah catatonit | tini | dumb-init passt slirp4netns
wiki
https://alt-kde.wiki/apps/distrobox/
!!! post-install steps
https://distrobox.it/posts/install_podman_static/
$ cat ~/.distroboxrc
container_always_pull="0"
container_manager="podman"
$ su - -c "echo "$USER:524288:65536" | tee -a /etc/subuid /etc/subgid"
$ cat /etc/subgid
iharh:524288:65536
su - -c "chmod u+s /usr/bin/newuidmap /usr/bin/newuidmap"
su - -c "chmod a+x /usr/bin/newuidmap /usr/bin/newgidmap"
podman system migrate
cli
https://distrobox.it/usage/usage/
/usr/bin/distrobox-enter
/usr/bin/distrobox
/usr/bin/distrobox-assemble
https://distrobox.it/usage/distrobox-create/
--clone/-c
--compatibility/-C:
show list of compatible images
quay.io/fedora/fedora:40
registry.fedoraproject.org/fedora-toolbox:40
???
docker.io/library/ubuntu:24.04
--home/-H:
select a custom HOME directory for the container. Useful to avoid host's home littering with temp files.
--additional-packages/-ap:
additional packages to install during initial container setup
--init/-I:
use init system (like systemd) inside the container.
this will make host's processes not visible from within the container. (assumes --unshare-process)
--dry-run/-d:
only print the container manager command generated (podman run command for creating container)
--verbose/-v:
show more verbosity
samples
distrobox create -i quay.io/fedora/fedora:40 -n fedora40 -H ~/distrobox/fedora40 -ap "systemd" -I
-d
-v
--additional-flags
"--env MY_VAR=value"
"--pids-limit -1"
--volume /opt/my-dir:/usr/local/my-dir:rw
--pre-init-hooks "dnf config-manager --enable powertools && dnf -y install epel-release"
--init-hooks "touch /var/tmp/test1 && touch /var/tmp/test2"
!!!
Error: Unable to find a match: libpam-systemd pipewire-audio-client-libraries
!!!
/usr/bin/distrobox-enter
...
--no-workdir/-nw:
always start the container from container's home directory
--additional-flags/-a:
additional flags to pass to the container manager command
...
enter "fedora1"
Starting container... [ OK ]
--- ??? ---
Installing basic packages... [ OK ]
Setting up devpts mounts... [ OK ]
Setting up read-only mounts... [ OK ]
Setting up read-write mounts... [ OK ]
Setting up host's sockets integration... [ OK ]
Integrating host's themes, icons, fonts... [ OK ]
Setting up distrobox profile... [ OK ]
Setting up sudo... [ OK ]
Setting up kerberos integration... [ OK ]
Setting up user's group list... [ OK ]
Setting up existing user... [ OK ]
Ensuring user's access... [ OK ]
Setting up skel... [ OK ]
Setting up init system... [ OK ]
Firing up init system... [ OK ]
---
Container Setup Complete!
generate_enter_command() {
...
# Start with the $PATH set in the container's config
container_paths="${container_path:-""}"
# Ensure the standard FHS program paths are in PATH environment
standard_paths="/usr/local/sbin /usr/local/bin /usr/sbin /usr/bin /sbin /bin"
if [ "${clean_path}" -eq 1 ]; then
...
else
...
fi
...
}
...
# dry run mode, just generate the command and print it. No execution.
if [ "${dryrun}" -ne 0 ]; then
cmd="$(generate_enter_command | sed 's/\t//g')"
printf "%s %s\n" "${cmd}" "$*"
exit 0
fi
/usr/bin/distrobox-ephemeral
/usr/bin/distrobox-export
distrobox-export --app kate
create desktop-file on a host system for guest app launcher
distrobox-export --bin /usr/bin/kate --export-path ~/local/bin/
! actually - broken
https://distrobox.it/usage/distrobox-generate-entry/
--delete/-d:
delete the entry
--verbose/-v:
show more verbosity
samples
distrobox generate-entry fedora40 -v
cat ~/.local/share/applications/fedora40.desktop
[Desktop Entry]
Name=Fedora40
GenericName=Terminal entering Fedora40
Comment=Terminal entering Fedora40
Categories=Distrobox;System;Utility
Exec=/usr/bin/distrobox enter fedora40
Icon=/home/iharh/.local/share/icons/distrobox/fedora.png
Keywords=distrobox;
NoDisplay=false
Terminal=true
TryExec=/usr/bin/distrobox
Type=Application
Actions=Remove;
[Desktop Action Remove]
Name=Remove Fedora40 from system
Exec=/usr/bin/distrobox rm fedora40
/usr/bin/distrobox-host-exec
https://distrobox.it/posts/execute_commands_on_host/
/usr/bin/distrobox-init
INIT_BINS="
/sbin/init
/usr/sbin/init
/lib/systemd/systemd
/usr/lib/systemd/systemd
/usr/bin/distrobox-list
/usr/bin/distrobox-rm
/usr/bin/distrobox-stop
/usr/bin/distrobox-upgrade
/usr/bin/distrobox-list
/usr/bin/distrobox-stop
/usr/bin/distrobox-rm
cfg
/usr/share/distrobox/distrobox.conf
/usr/etc/distrobox/distrobox.conf
/etc/distrobox/distrobox.conf
${HOME}/.config/distrobox/distrobox.conf
${HOME}/.distroboxrc
env vars
DBX_CONTAINER_ALWAYS_PULL
DBX_CONTAINER_CUSTOM_HOME
DBX_CONTAINER_IMAGE
DBX_CONTAINER_MANAGER
DBX_CONTAINER_NAME
DBX_CONTAINER_ENTRY
DBX_NON_INTERACTIVE
DBX_SKIP_WORKDIR
internals
...
DEBU[0000] Using conmon: "/usr/bin/conmon"
INFO[0000] Using sqlite as database backend
DEBU[0000] Using graph driver overlay
DEBU[0000] Using graph root /home/iharh/.local/share/containers/storage
DEBU[0000] Using run root /run/user/1000/containers
DEBU[0000] Using static dir /home/iharh/.local/share/containers/storage/libpod
DEBU[0000] Using tmp dir /run/user/1000/libpod/tmp
DEBU[0000] Using volume path /home/iharh/.local/share/containers/storage/volumes
...
DEBU[0000] Initializing event backend journald
DEBU[0000] Configured OCI runtime runj initialization failed: no valid executable found for OCI runtime runj: invalid argument
DEBU[0000] Configured OCI runtime runsc initialization failed: no valid executable found for OCI runtime runsc: invalid argument
DEBU[0000] Configured OCI runtime crun-vm initialization failed: no valid executable found for OCI runtime crun-vm: invalid argument
DEBU[0000] Configured OCI runtime youki initialization failed: no valid executable found for OCI runtime youki: invalid argument
DEBU[0000] Configured OCI runtime krun initialization failed: no valid executable found for OCI runtime krun: invalid argument
DEBU[0000] Configured OCI runtime ocijail initialization failed: no valid executable found for OCI runtime ocijail: invalid argument
DEBU[0000] Configured OCI runtime crun-wasm initialization failed: no valid executable found for OCI runtime crun-wasm: invalid argument
DEBU[0000] Configured OCI runtime kata initialization failed: no valid executable found for OCI runtime kata: invalid argument
DEBU[0000] Using OCI runtime "/usr/bin/crun"
...
+ mkdir -p /home/iharh/.local/share/applications
+ mkdir -p /home/iharh/.local/share/icons/distrobox
+++ realpath /usr/bin/distrobox-generate-entry
++ dirname /usr/bin/distrobox-generate-entry
...
2023
TheLinuxCast - 5 Reasons You Should Use Distrobox of 20:54
https://www.youtube.com/watch?v=eqWjfMwPUYc
TheLinuxCast - Get Any App on Any Distro Easily of 26:26
https://www.youtube.com/watch?v=eh-a1W5IJbA
https://itsfoss.com/distrobox/
https://www.opennet.ru/opennews/art.shtml?num=60147
! 1.6
2022
https://www.tecmint.com/distrobox-run-any-linux-distribution/
JorgeCastro - How I use distrobox on Fedora Silverblue 0:00 of 12:33
https://www.youtube.com/watch?v=Q2PrISAOtbY
!!!
Brodie Robertson - Turning Distrobox Into Your Entire Linux Desktop of 11:48
https://www.youtube.com/watch?v=IIVv5NjyYl0
Brodie Robertson - Distrobox Is Basically A Linux Subsystem For Linux of 16:41
https://www.youtube.com/watch?v=FhW-3PPldAg
! 14:00 xhost +si:localuser:$USER # for x-server ACL ...
????
https://www.youtube.com/watch?v=Wp8v0e1-wT8
https://www.youtube.com/watch?v=w9SlWZf0y8I
https://www.youtube.com/watch?v=7-FPAWjROos
https://www.youtube.com/watch?v=3YOpUEKSBFI
https://www.youtube.com/watch?v=Q2PrISAOtbY