Add Docker output format

This will add a Dockerfile which will build the contents into an
image and then call `tinit` to start it.

This is fairly experimental, but is a prototype for other non
LinuxKit outputs. The container will need to run as `privileged`
as `runc` needs quite a few capabilities and `containerd` needs to
mount.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
This commit is contained in:
Justin Cormack
2017-06-07 15:32:02 +01:00
parent ca677b3c40
commit 8abeffde59
2 changed files with 45 additions and 4 deletions

View File

@@ -60,7 +60,7 @@ func ensureLinuxkitImage(name string) error {
}
// TODO pass through --pull to here
buf := new(bytes.Buffer)
buildInternal(m, buf, false)
buildInternal(m, buf, false, nil)
image := buf.Bytes()
kernel, initrd, cmdline, err := tarToInitrd(image)
if err != nil {