diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2019-03-13 17:17:07 -0400 |
---|---|---|
committer | Daniel J Walsh <dwalsh@redhat.com> | 2019-03-29 08:27:33 -0400 |
commit | c37589f503913ac85622cc9110e2eb983b1b38f3 (patch) | |
tree | 9061248749f167ec6a5674efa97fef55d2890a95 /libpod/image/pull.go | |
parent | 6ab27c6355a4df228ed6d527162d5251d867b9b3 (diff) | |
download | podman-c37589f503913ac85622cc9110e2eb983b1b38f3.tar.gz podman-c37589f503913ac85622cc9110e2eb983b1b38f3.tar.bz2 podman-c37589f503913ac85622cc9110e2eb983b1b38f3.zip |
Set blob cache directory based on GraphDriver
Currently in rootless containers, we end up not using the blob cache.
We also don't store the blob cache based on the users specified graph
storage. This change will cause the cache directory to be stored with
the rest of the containe images.
While doing this patch, I found that we had duplicated GetSystemContext in
two places in libpod. I cleaned this up.
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'libpod/image/pull.go')
-rw-r--r-- | libpod/image/pull.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libpod/image/pull.go b/libpod/image/pull.go index a3b716e65..5a0706b07 100644 --- a/libpod/image/pull.go +++ b/libpod/image/pull.go @@ -4,6 +4,7 @@ import ( "context" "fmt" "io" + "path/filepath" "strings" cp "github.com/containers/image/copy" @@ -204,6 +205,7 @@ func (ir *Runtime) pullImageFromHeuristicSource(ctx context.Context, inputName s var goal *pullGoal sc := GetSystemContext(signaturePolicyPath, authfile, false) + sc.BlobInfoCacheDir = filepath.Join(ir.store.GraphRoot(), "cache") srcRef, err := alltransports.ParseImageName(inputName) if err != nil { // could be trying to pull from registry with short name |