mirror of
https://github.com/containers/podman.git
synced 2025-05-17 15:18:43 +08:00
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 <matthew.heon@gmail.com> Closes: #571 Approved by: rhatdan
This commit is contained in:
@ -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
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user