create temporary dir for overlayfs not in __child

This commit is contained in:
Christian Goll
2023-01-27 16:19:30 +01:00
parent 6d560ac02a
commit 71a3867bbe
4 changed files with 39 additions and 31 deletions

View File

@@ -27,12 +27,14 @@ var (
}
SyncUser bool
binds []string
tempDir string
)
func init() {
baseCmd.AddCommand(child.GetCommand())
baseCmd.PersistentFlags().StringArrayVarP(&binds, "bind", "b", []string{}, "Bind a local path into the container (must exist)")
baseCmd.PersistentFlags().BoolVar(&SyncUser, "syncuser", false, "Synchronize UIDs/GIDs from host to container")
baseCmd.PersistentFlags().StringVar(&tempDir, "tempdir", "", "Use tempdir for constructing the overlay fs (only used if mount points don't exist in container)")
}
// GetRootCommand returns the root cobra.Command for the application.