Distrobox : Add attach for docker-rootless.

This commit is contained in:
Dmitry Voronin 2024-02-08 03:05:35 +03:00
parent 360ddd681e
commit 8d3ef9b9b7

View file

@ -0,0 +1,15 @@
# Create/Attach to the box.
# Uses name `main` by default.
# Usage: da [BOX]
function da() {
local name="${1}"
[[ "${name}" = "" ]] && name="main"
# if [[ "${name}" = "" ]]; then
# help da
# return 2
# fi
# --user 0 is required for rootless docker.
distrobox enter -a '--user=0' "${name}"
}