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

@ -194,7 +194,7 @@ func (s *Server) RunPodSandbox(ctx context.Context, req *pb.RunPodSandboxRequest
if _, err = os.Stat(podInfraRootfs); err != nil {
if os.IsNotExist(err) {
// TODO: Replace by rootfs creation API when it is ready
if err = utils.CreateFakeRootfs(podInfraRootfs, "docker://kubernetes/pause"); err != nil {
if err = utils.CreateInfraRootfs(podInfraRootfs, s.pausePath); err != nil {
return nil, err
}
} else {