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

@ -27,6 +27,7 @@ type Server struct {
root string
runtime *oci.Runtime
sandboxDir string
pausePath string
stateLock sync.Mutex
state *serverState
netPlugin ocicni.CNIPlugin
@ -107,7 +108,7 @@ func (s *Server) releasePodName(name string) {
}
// New creates a new Server with options provided
func New(runtimePath, root, sandboxDir, containerDir string, conmonPath string) (*Server, error) {
func New(runtimePath, root, sandboxDir, containerDir, conmonPath, pausePath 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 {
@ -139,6 +140,7 @@ func New(runtimePath, root, sandboxDir, containerDir string, conmonPath string)
runtime: r,
netPlugin: netPlugin,
sandboxDir: sandboxDir,
pausePath: pausePath,
state: &serverState{
sandboxes: sandboxes,
containers: containers,