mirror of
https://github.com/opencontainers/runc.git
synced 2025-10-30 10:36:27 +08:00
libcontainer: remove LinuxFactory
Since LinuxFactory has become the means to specify containers state top directory (aka --root), and is only used by two methods (Create and Load), it is easier to pass root to them directly. Modify all the users and the docs accordingly. While at it, fix Create and Load docs (those that were originally moved from the Factory interface docs). Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
@@ -169,11 +169,7 @@ func newContainer(t *testing.T, config *configs.Config) (libcontainer.Container,
|
||||
name := strings.ReplaceAll(t.Name(), "/", "_") + strconv.FormatInt(-int64(time.Now().Nanosecond()), 35)
|
||||
root := t.TempDir()
|
||||
|
||||
f, err := libcontainer.New(root)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return f.Create(name, config)
|
||||
return libcontainer.Create(root, name, config)
|
||||
}
|
||||
|
||||
// runContainer runs the container with the specific config and arguments
|
||||
|
||||
Reference in New Issue
Block a user