server: create pause rootfs manually without Docker

This lessens the Docker requirement for creating sandboxes (with the
requirement only existing for the actual image pulling that is done when
adding a container to a pod). The interface was chosen to match the
--conmon interface, so that the location of the pause binary can be
chosen by a user.

Signed-off-by: Aleksa Sarai <asarai@suse.de>
This commit is contained in:
Aleksa Sarai 2016-10-02 20:11:07 +11:00
parent 1313f0dd72
commit bac579a9e5
No known key found for this signature in database
GPG key ID: 9E18AA267DDB8DB4
5 changed files with 47 additions and 4 deletions

View file

@ -16,6 +16,7 @@ import (
const (
ocidRoot = "/var/lib/ocid"
conmonPath = "/usr/libexec/ocid/conmon"
pausePath = "/usr/libexec/ocid/pause"
)
func main() {
@ -30,6 +31,11 @@ func main() {
Value: conmonPath,
Usage: "path to the conmon executable",
},
cli.StringFlag{
Name: "pause",
Value: pausePath,
Usage: "path to the pause executable",
},
cli.StringFlag{
Name: "root",
Value: ocidRoot,
@ -110,7 +116,8 @@ func main() {
containerDir := c.String("containerdir")
sandboxDir := c.String("sandboxdir")
service, err := server.New(c.String("runtime"), c.String("root"), sandboxDir, containerDir, conmonPath)
pausePath := c.String("pause")
service, err := server.New(c.String("runtime"), c.String("root"), sandboxDir, containerDir, conmonPath, pausePath)
if err != nil {
logrus.Fatal(err)
}