Distrobox : Add attach for docker-rootless.
This commit is contained in:
parent
360ddd681e
commit
8d3ef9b9b7
15
.config/bash/module/Distrobox.sh
Normal file
15
.config/bash/module/Distrobox.sh
Normal 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}"
|
||||
}
|
Reference in a new issue