summaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@open-infrastructure.net>2022-05-01 05:18:45 +0000
committerDaniel Baumann <daniel.baumann@open-infrastructure.net>2022-05-01 05:19:20 +0000
commitbaa1a15eb54693784ddeca9561357e8213049241 (patch)
tree3691b4b3459c94eaf99eef4fca2ddcff65c86f32 /share
parentReleasing version 20220430. (diff)
downloadcompute-tools-baa1a15eb54693784ddeca9561357e8213049241.tar.xz
compute-tools-baa1a15eb54693784ddeca9561357e8213049241.zip
Adding container rebuild command.
Signed-off-by: Daniel Baumann <daniel.baumann@open-infrastructure.net>
Diffstat (limited to 'share')
-rw-r--r--share/bash-completion/container16
-rw-r--r--share/man/container-rebuild.1.rst93
-rw-r--r--share/man/container.1.rst3
3 files changed, 112 insertions, 0 deletions
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 <daniel.baumann@open-infrastructure.net>
+..
+.. 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 <https://www.gnu.org/licenses/>.
+
+=================
+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
+<software@lists.open-infrastructure.net>.
+
+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
+<daniel.baumann@open-infrastructure.net> 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).