direct file is now also suppored
This commit is contained in:
@@ -99,7 +99,8 @@ func CobraRunE(cmd *cobra.Command, args []string) error {
|
||||
wwlog.Printf(wwlog.ERROR, "VNFS Name exists, specify --force, --update, or choose a different name: %s\n", name)
|
||||
os.Exit(1)
|
||||
}
|
||||
} else if strings.HasPrefix(uri, "docker://") || strings.HasPrefix(uri, "docker-daemon://") || strings.HasPrefix(uri, "file://") {
|
||||
} else if strings.HasPrefix(uri, "docker://") || strings.HasPrefix(uri, "docker-daemon://") ||
|
||||
strings.HasPrefix(uri, "file://") || util.IsFile(uri) {
|
||||
sCtx, err := getSystemContext()
|
||||
if err != nil {
|
||||
wwlog.Printf(wwlog.ERROR, "%s\n", err)
|
||||
|
||||
@@ -8,7 +8,13 @@ var (
|
||||
Use: "import [OPTIONS] SOURCE [NAME]",
|
||||
Short: "Import a container into Warewulf",
|
||||
Long: `This command will pull and import a container into Warewulf from SOURCE,
|
||||
optionally renaming it to NAME. The SOURCE must be in a supported URI format.
|
||||
optionally renaming it to NAME. The SOURCE must be in a supported URI format. Formats
|
||||
are:
|
||||
* docker://registry.example.org/example:latest
|
||||
* docker-daemon://example:latest
|
||||
* file://path/to/archive/tar/ball
|
||||
* /path/to/archive/tar/ball
|
||||
* /path/to/chroot/
|
||||
Imported containers are used to create bootable VNFS images.`,
|
||||
Example: "wwctl container import docker://warewulf/centos-8 my_container",
|
||||
RunE: CobraRunE,
|
||||
|
||||
Reference in New Issue
Block a user