Add container dir to oci
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
This commit is contained in:
parent
ac1340488d
commit
764f02ca11
3 changed files with 19 additions and 7 deletions
14
oci/oci.go
14
oci/oci.go
|
@ -8,11 +8,12 @@ import (
|
|||
)
|
||||
|
||||
// New creates a new Runtime with options provided
|
||||
func New(runtimePath string, sandboxDir string) (*Runtime, error) {
|
||||
func New(runtimePath string, sandboxDir string, containerDir string) (*Runtime, error) {
|
||||
r := &Runtime{
|
||||
name: filepath.Base(runtimePath),
|
||||
path: runtimePath,
|
||||
sandboxDir: sandboxDir,
|
||||
name: filepath.Base(runtimePath),
|
||||
path: runtimePath,
|
||||
sandboxDir: sandboxDir,
|
||||
containerDir: containerDir,
|
||||
}
|
||||
return r, nil
|
||||
}
|
||||
|
@ -39,6 +40,11 @@ func (r *Runtime) SandboxDir() string {
|
|||
return r.sandboxDir
|
||||
}
|
||||
|
||||
// ContainerDir returns the path to the base directory for storing container configurations
|
||||
func (r *Runtime) ContainerDir() string {
|
||||
return r.containerDir
|
||||
}
|
||||
|
||||
// Version returns the version of the OCI Runtime
|
||||
func (r *Runtime) Version() (string, error) {
|
||||
runtimeVersion, err := getOCIVersion(r.path, "-v")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue