cmd/server: provide a flag to set ocid root dir
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
This commit is contained in:
parent
a16a4df967
commit
857aaa7816
3 changed files with 17 additions and 4 deletions
|
@ -24,6 +24,7 @@ const (
|
|||
|
||||
// Server implements the RuntimeService and ImageService
|
||||
type Server struct {
|
||||
root string
|
||||
runtime *oci.Runtime
|
||||
sandboxDir string
|
||||
stateLock sync.Mutex
|
||||
|
@ -102,7 +103,7 @@ func (s *Server) reservePodName(id, name string) (string, error) {
|
|||
}
|
||||
|
||||
// New creates a new Server with options provided
|
||||
func New(runtimePath, sandboxDir, containerDir string) (*Server, error) {
|
||||
func New(runtimePath, root, sandboxDir, containerDir string) (*Server, error) {
|
||||
// TODO: This will go away later when we have wrapper process or systemd acting as
|
||||
// subreaper.
|
||||
if err := utils.SetSubreaper(1); err != nil {
|
||||
|
@ -130,6 +131,7 @@ func New(runtimePath, sandboxDir, containerDir string) (*Server, error) {
|
|||
return nil, err
|
||||
}
|
||||
s := &Server{
|
||||
root: root,
|
||||
runtime: r,
|
||||
netPlugin: netPlugin,
|
||||
sandboxDir: sandboxDir,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue