podman: add support for splitting imagestore

Add support for `--imagestore` in podman which allows users to split the filesystem of containers vs image store, imagestore if configured will pull images in image storage instead of the graphRoot while keeping the other parts still in the originally configured graphRoot.

This is an implementation of
https://github.com/containers/storage/pull/1549 in podman.

Signed-off-by: Aditya R <arajan@redhat.com>
This commit is contained in:
Aditya R
2023-06-13 11:11:42 +05:30
parent 719e3228b1
commit 3829fbd35a
7 changed files with 97 additions and 0 deletions

View File

@ -126,6 +126,18 @@ func WithTransientStore(transientStore bool) RuntimeOption {
}
}
func WithImageStore(imageStore string) RuntimeOption {
return func(rt *Runtime) error {
if rt.valid {
return define.ErrRuntimeFinalized
}
rt.storageConfig.ImageStore = imageStore
return nil
}
}
// WithSignaturePolicy specifies the path of a file which decides how trust is
// managed for images we've pulled.
// If this is not specified, the system default configuration will be used