Export CreateLibcontainerConfig

Users of libcontainer other than runc may also require parsing and
converting specification configuration files.

Since runc cannot be imported, move the relevant functions and
definitions to a separate package, libcontainer/specconv.

Signed-off-by: Ido Yariv <ido@wizery.com>
This commit is contained in:
Ido Yariv
2016-03-25 11:44:09 -04:00
parent 344b0ccaa6
commit 28b21a5988
5 changed files with 750 additions and 734 deletions
+2 -1
View File
@@ -10,6 +10,7 @@ import (
"github.com/codegangsta/cli"
"github.com/opencontainers/runc/libcontainer"
"github.com/opencontainers/runc/libcontainer/configs"
"github.com/opencontainers/runc/libcontainer/specconv"
"github.com/opencontainers/specs/specs-go"
)
@@ -92,7 +93,7 @@ using the runc checkpoint command.`,
if err != nil {
fatal(err)
}
config, err := createLibcontainerConfig(id, context.GlobalBool("systemd-cgroup"), spec)
config, err := specconv.CreateLibcontainerConfig(id, context.GlobalBool("systemd-cgroup"), spec)
if err != nil {
fatal(err)
}