diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2020-04-30 08:40:16 -0400 |
---|---|---|
committer | Daniel J Walsh <dwalsh@redhat.com> | 2020-05-01 15:00:33 -0400 |
commit | 97fcbfcbec4c754f2c5a71daadbf933a6ebb0634 (patch) | |
tree | 7a1011275dea1080277c0fc4f9761757a56aaf76 /vendor/github.com/fsouza/go-dockerclient/tar.go | |
parent | 4a2765c4989df88681c18333c1ae45017e09613a (diff) | |
download | podman-97fcbfcbec4c754f2c5a71daadbf933a6ebb0634.tar.gz podman-97fcbfcbec4c754f2c5a71daadbf933a6ebb0634.tar.bz2 podman-97fcbfcbec4c754f2c5a71daadbf933a6ebb0634.zip |
cgroupsns was not following containers.conf
Implement ParseCgroupsNamespace to handle defaults.
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'vendor/github.com/fsouza/go-dockerclient/tar.go')
-rw-r--r-- | vendor/github.com/fsouza/go-dockerclient/tar.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/vendor/github.com/fsouza/go-dockerclient/tar.go b/vendor/github.com/fsouza/go-dockerclient/tar.go index 9716a7712..f27a7bbf2 100644 --- a/vendor/github.com/fsouza/go-dockerclient/tar.go +++ b/vendor/github.com/fsouza/go-dockerclient/tar.go @@ -47,7 +47,7 @@ func createTarStream(srcPath, dockerfilePath string) (io.ReadCloser, error) { } keepThem, err := fileutils.Matches(includeFile, excludes) if err != nil { - return nil, fmt.Errorf("cannot match .dockerfile: '%s', error: %s", includeFile, err) + return nil, fmt.Errorf("cannot match .dockerfileignore: '%s', error: %w", includeFile, err) } if keepThem { includes = append(includes, includeFile) @@ -85,7 +85,7 @@ func validateContextDirectory(srcPath string, excludes []string) error { if err != nil { if os.IsPermission(err) { - return fmt.Errorf("can't stat '%s'", filePath) + return fmt.Errorf("cannot stat %q: %w", filePath, err) } if os.IsNotExist(err) { return nil @@ -101,8 +101,8 @@ func validateContextDirectory(srcPath string, excludes []string) error { if !f.IsDir() { currentFile, err := os.Open(filePath) - if err != nil && os.IsPermission(err) { - return fmt.Errorf("no permission to read from '%s'", filePath) + if err != nil { + return fmt.Errorf("cannot open %q for reading: %w", filePath, err) } currentFile.Close() } @@ -114,7 +114,7 @@ func parseDockerignore(root string) ([]string, error) { var excludes []string ignore, err := ioutil.ReadFile(path.Join(root, ".dockerignore")) if err != nil && !os.IsNotExist(err) { - return excludes, fmt.Errorf("error reading .dockerignore: '%s'", err) + return excludes, fmt.Errorf("error reading .dockerignore: %w", err) } excludes = strings.Split(string(ignore), "\n") |