From 48811d539ed611c45d97d28a651e341ebeecdc92 Mon Sep 17 00:00:00 2001 From: Matthew Heon Date: Sat, 31 Mar 2018 21:34:50 -0400 Subject: Don't return an ImageConfig when creating storage We don't use it directly, we aren't going to cache it in the DB, and when we do use it (image volumes) we might well be in a different process (podman create -> podman start). No point in keeping it around. Signed-off-by: Matthew Heon Closes: #571 Approved by: rhatdan --- libpod/storage.go | 8 -------- 1 file changed, 8 deletions(-) (limited to 'libpod/storage.go') diff --git a/libpod/storage.go b/libpod/storage.go index 100f96e7e..d135285f6 100644 --- a/libpod/storage.go +++ b/libpod/storage.go @@ -7,7 +7,6 @@ import ( istorage "github.com/containers/image/storage" "github.com/containers/image/types" "github.com/containers/storage" - "github.com/opencontainers/image-spec/specs-go/v1" "github.com/pkg/errors" "github.com/sirupsen/logrus" ) @@ -29,7 +28,6 @@ func getStorageService(store storage.Store) (*storageService, error) { type ContainerInfo struct { Dir string RunDir string - Config *v1.Image } // RuntimeContainerMetadata is the structure that we encode as JSON and store @@ -82,11 +80,6 @@ func (r *storageService) CreateContainerStorage(systemContext *types.SystemConte } defer image.Close() - imageConfig, err := image.OCIConfig() - if err != nil { - return ContainerInfo{}, err - } - // Update the image name and ID. if imageName == "" && len(img.Names) > 0 { imageName = img.Names[0] @@ -159,7 +152,6 @@ func (r *storageService) CreateContainerStorage(systemContext *types.SystemConte return ContainerInfo{ Dir: containerDir, RunDir: containerRunDir, - Config: imageConfig, }, nil } -- cgit v1.2.3-54-g00ecf