Readding Yong's addition of graphdriver/copy

This commit is contained in:
Gregory Kurtzer
2021-04-23 21:49:25 -07:00
parent 60b827ab3e
commit ad6dec792b
3 changed files with 513 additions and 3 deletions

6
go.mod
View File

@@ -5,10 +5,12 @@ go 1.15
require (
github.com/brotherpowers/ipsubnet v0.0.0-20170914094241-30bc98f0a5b1
github.com/containers/image/v5 v5.7.0
github.com/docker/docker v1.4.2-0.20191219165747-a9416c67da9f
github.com/containers/storage v1.30.0
github.com/docker/docker v1.4.2-0.20191219165747-a9416c67da9f // indirect
github.com/manifoldco/promptui v0.8.0
github.com/opencontainers/image-spec v1.0.2-0.20190823105129-775207bd45b6
github.com/opencontainers/umoci v0.4.6
github.com/plus3it/gorecurcopy v0.0.1 // indirect
github.com/spf13/cobra v1.1.1
gopkg.in/yaml.v2 v2.3.0
gopkg.in/yaml.v2 v2.4.0
)

507
go.sum

File diff suppressed because it is too large Load Diff

View File

@@ -8,6 +8,7 @@ import (
"github.com/hpcng/warewulf/internal/pkg/util"
"github.com/containers/image/v5/types"
"github.com/containers/storage/drivers/copy"
"github.com/hpcng/warewulf/internal/pkg/config"
"github.com/hpcng/warewulf/internal/pkg/errors"
"github.com/hpcng/warewulf/internal/pkg/oci"
@@ -67,7 +68,7 @@ func ImportDirectory(uri string, name string) error {
return errors.New("Source directory has no /bin/sh: " + uri)
}
err = util.CopyFiles(uri, fullPath)
err = copy.DirCopy(uri, fullPath, copy.Content, true)
if err != nil {
return err
}