From baa1a15eb54693784ddeca9561357e8213049241 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 1 May 2022 07:18:45 +0200 Subject: Adding container rebuild command. Signed-off-by: Daniel Baumann --- share/bash-completion/container | 16 +++++++ share/man/container-rebuild.1.rst | 93 +++++++++++++++++++++++++++++++++++++++ share/man/container.1.rst | 3 ++ 3 files changed, 112 insertions(+) create mode 100644 share/man/container-rebuild.1.rst (limited to 'share') diff --git a/share/bash-completion/container b/share/bash-completion/container index 24205d7..1637b5e 100644 --- a/share/bash-completion/container +++ b/share/bash-completion/container @@ -264,6 +264,22 @@ _container() esac ;; + rebuild|rb) + case "${prev}" in + -n|--name) + opts="$(container list -f shell)" + COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) + return 0 + ;; + + *) + opts="-n --name -f --force -v --verbose" + COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) + return 0 + ;; + esac + ;; + restart|rt) case "${prev}" in -n|--name) diff --git a/share/man/container-rebuild.1.rst b/share/man/container-rebuild.1.rst new file mode 100644 index 0000000..0bd63d8 --- /dev/null +++ b/share/man/container-rebuild.1.rst @@ -0,0 +1,93 @@ +.. Open Infrastructure: compute-tools + +.. Copyright (C) 2014-2021 Daniel Baumann +.. +.. SPDX-License-Identifier: GPL-3.0+ +.. +.. This program is free software: you can redistribute it and/or modify +.. it under the terms of the GNU General Public License as published by +.. the Free Software Foundation, either version 3 of the License, or +.. (at your option) any later version. +.. +.. This program is distributed in the hope that it will be useful, +.. but WITHOUT ANY WARRANTY; without even the implied warranty of +.. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +.. GNU General Public License for more details. +.. +.. You should have received a copy of the GNU General Public License +.. along with this program. If not, see . + +================= +container-rebuild +================= + +------------------- +Restart a container +------------------- + +:manual section: 1 +:manual group: Open Infrastructure + +Synopsis +======== + +| **container rebuild** ['OPTIONS'] +| **cnt rb** ['OPTIONS'] + +Description +=========== + +The **container rebuild** command rebuilds a container by stopping, building, starting an existing container. + +Options +======= + +The following **container rebuild** options are available: + +-n, --name='NAME': + Specify container name. Specifying 'ALL' will rebuild all started container. + +-f, --force: + Do not fail if container is running. + +-v, --verbose: + Explain what is being done. + +Examples +======== + +Rebuild example.net container: + + sudo container rebuild -n example.net + +Restart all container: + + sudo container rebuild -n ALL + +See also +======== + +| compute-tools(7), +| container(1). + +Homepage +======== + +More information about compute-tools and the Open Infrastructure project can be +found on the homepage (https://open-infrastructure.net). + +Contact +======= + +Bug reports, feature requests, help, patches, support and everything else are +welcome on the Open Infrastructure Software Mailing List +. + +Debian specific bugs can also be reported in the Debian Bug Tracking System +(https://bugs.debian.org). + +Authors +======= + +compute-tools were written by Daniel Baumann + and others. diff --git a/share/man/container.1.rst b/share/man/container.1.rst index 3fff87b..5e43963 100644 --- a/share/man/container.1.rst +++ b/share/man/container.1.rst @@ -59,6 +59,9 @@ build: start: Start a container, see container-start(1). +rebuild: + Rebuild a container, see container-rebuild(1). + restart: Restart a container, see container-restart(1). -- cgit v1.2.3