#!/bin/bash # Run a docker command-line string in the right context for the install mode. # rootless -> as the docker install user (owns the rootless daemon + socket) # rooted -> as the manager (in the docker group, talks to the root socket # directly — no sudo) dockerCommandRun() { local command="$1" if [[ $CFG_DOCKER_INSTALL_TYPE == "rootless" ]]; then dockerCommandRunInstallUser "$command" elif [[ $CFG_DOCKER_INSTALL_TYPE == "rooted" ]]; then bash -c "$command" fi }