client: docker: add exec wrapper, update completion

This commit is contained in:
2025-11-24 17:33:16 -08:00
parent a75f8add47
commit 221a5f7049
4 changed files with 21 additions and 2 deletions

View File

@@ -505,6 +505,11 @@ function lib_docker::__shell()
docker exec -it --user "$global_arg_user" --workdir / "$global_container" /bin/bash
}
function lib_docker::__exec()
{
docker exec -it "$global_container" /bin/bash -i -c "$@"
}
function lib_docker::__parse_args_edit()
{
[ -z "$global_usage" ] && lib_utils::die_fatal

View File

@@ -218,6 +218,16 @@ function lib_docker::shell()
lib_utils::catch $?
}
#
# Execute command within a running docker-finance container
#
function lib_docker::exec()
{
lib_docker::__exec "$@"
lib_utils::catch $?
}
#
# Edit client configuration of given docker-finance instance
#