Add wwctl container <exec|shell> --build=false

- Closes #1490
- Closes #1489

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
This commit is contained in:
Jonathon Anderson
2024-12-19 02:10:59 -07:00
committed by Christian Goll
parent ebf53bae22
commit 1a3b9a16ed
8 changed files with 46 additions and 24 deletions

View File

@@ -26,6 +26,7 @@ var (
binds []string
nodeName string
syncUser bool
build bool
)
func init() {
@@ -35,6 +36,7 @@ set, uses the same path as source. "ro" binds read-only. "copy" temporarily
copies the file into the container.`)
baseCmd.PersistentFlags().StringVarP(&nodeName, "node", "n", "", "Create a read only view of the container for the given node")
baseCmd.PersistentFlags().BoolVar(&syncUser, "syncuser", false, "Synchronize UIDs/GIDs from host to container")
baseCmd.PersistentFlags().BoolVar(&build, "build", true, "(Re)build the container image automatically")
}
// GetRootCommand returns the root cobra.Command for the application.