Manage Docker Containers

SolidGroundUX DocumentationSolidGroundUX
NL

Create and manage Docker containers and images

Source: target-root/usr/local/libexec/solidgroundux/manage-docker-containers.sh

Create and manage Docker containers and images

Public functions

Internal functions
FunctionPurposeArgumentsOutput
_dryrun_completeReport the dry-run result without executing the requested host change.——
_docker_require_daemonCheck that the Docker daemon is available for container operations.——
_docker_validate_nameValidate the proposed Docker container name.——
_docker_trimRemove leading and trailing whitespace from the supplied value.- $1: Value to inspect or write.—
_docker_print_commandFormat a command for dry-run reporting without executing it.——
_docker_validate_portAccept a decimal TCP/UDP port number from 1 through 65535.- $1: Value to inspect or write.—
_docker_validate_absolute_pathReject empty, root-only, relative, and multiline host paths.- $1: Value to inspect or write.—
_docker_validate_env_nameCheck that a variable name follows the environment-key syntax.——
_docker_select_labeled_valuePrompt for a value while displaying separate labels and optional explanatory details.- $1: Name of the shell variable receiving the result.—
_docker_select_containerPrompt for an existing Docker container and return its identifier.- $1: Name of the shell variable receiving the result.—
_docker_select_local_imagePrompt for a locally available Docker image.- $1: Name of the shell variable receiving the result.—
_docker_search_hub_repositorySearch Docker Hub for repositories matching the supplied query.- $1: Name of the shell variable receiving the result.—
_docker_list_hub_tagsRetrieve available tags for the selected Docker Hub repository.- $1: Docker Hub image repository.—
_docker_select_hub_tagPrompt for the desired image tag from Docker Hub results.- $1: Name of the shell variable receiving the result.—
_docker_select_restart_policyPrompt for a Docker container restart policy.- $1: Name of the shell variable receiving the result.—
_docker_collect_port_mappingsCollect and validate host-to-container port mappings for container creation.- $1: Name of the selected item.—
_docker_collect_volume_mappingsCollect host-volume-to-container path mappings for container creation.- $1: Name of the selected item.—
_docker_collect_environmentCollect environment-variable assignments for a new Docker container.- $1: Name of the selected item.—
_docker_ask_selectionPresent numbered Docker management choices and write the selection to an output variable.- $2: Name of the output shell variable.—
_docker_list_containersDisplay existing Docker containers and their current states.——
_docker_list_imagesDisplay locally stored Docker images.——
_docker_inspect_containerDisplay detailed configuration for a selected Docker container.——
_docker_show_logsDisplay or follow logs for the selected Docker container.——
_docker_pull_imagePull the selected repository and tag from a Docker image registry.——
_docker_create_containerCollect settings and create a Docker container from an available image.——
_docker_start_containerStart the selected Docker container.——
_docker_stop_containerStop the selected running Docker container.——
_docker_restart_containerRestart the selected Docker container.——
_docker_open_container_shellLet an operator enter a running container without having to remember docker exec syntax.——
_docker_remove_containerConfirm and remove the selected Docker container.——
_docker_action_againGive repeatable Docker management actions the standard SolidGroundUX——
_docker_return_to_menuLet read-only Docker actions end naturally without offering a redundant repeat option.——
_run_actionDispatch the requested management action to its implementation.- $1: Management action to execute.—

Description

Provides guided Docker image discovery, image pulling, container creation, and common lifecycle operations without attempting to replace Docker Compose or a full container-management product. Docker Hub search/tag discovery is offered as the friendly default, with manual image references retained as a fallback.

Usage

Run the executable from its shell command (or installed wrapper):

manage-docker-containers --action list
manage-docker-containers --dryrun --action create

Script-specific options:

  • --action NAME, -a: Management action (supported actions: list, create, start, stop, restart, shell, remove, inspect, logs, images, pull).