Skip to content
This repository was archived by the owner on Oct 30, 2018. It is now read-only.

Add 'kernel+squashfs' output format #214

Merged
merged 3 commits into from
Apr 16, 2018
Merged

Add 'kernel+squashfs' output format #214

merged 3 commits into from
Apr 16, 2018

Conversation

rn
Copy link
Member

@rn rn commented Apr 16, 2018

This output produces a kernel and a root filesystem in squashfs format. squashfs is a read-only, compressed filesystem.

The 'kernel+squashfs' output can be used in a similar way as the default 'kernel+initrd' output format with the benefit that the rootfs does not consume any memory.

There is an additional commit which improves the logging for dockerRun().

The linuxkit/mkimage-squashfs is already build and pushed.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
return err
}
case "boot/ucode.cpio":
// skip this entry
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it may be better to skip any other file under boot/ as if any are added you don't keep the directory so will cause issues. Or leave the empty directory?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I copied the pattern from here: https://github.com/moby/tool/blob/master/src/initrd/initrd.go#L137

Pushed a fix and also changes initrd.go accordingly

This output produces a kernel and a root filesystem
in squashfs format. squashfs is a read-only, compressed
filesystem.

The 'kernel+squashfs' output can be used in a similar way as
the default 'kernel+initrd' output format with the benefit
that the rootfs does not consume any memory.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
For the initrd we only want to extract kernel, cmdline, and
the ucode CPIO archive. Skip whatever is left in ./boot

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
@justincormack justincormack merged commit 3dbad3b into moby:master Apr 16, 2018
@rn rn deleted the squash branch April 16, 2018 13:47
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants