A toolkit for building secure, portable and lean operating systems for containers
Go to file
Dieter Reuter f6c2bca4cb Fix link to Landlock project
Signed-off-by: Dieter Reuter <dieter.reuter@me.com>
2017-04-09 20:06:04 +00:00
base Split out init to have standalone runc, containerd 2017-04-07 16:25:18 +01:00
docs trust: add yaml docs 2017-04-08 17:25:33 -07:00
examples Update to new init container with mount changes 2017-04-09 13:52:45 +01:00
kernel Sign and verify kernel image on make push 2017-04-04 08:33:48 -07:00
pkg Change propagation for root 2017-04-09 13:50:04 +01:00
projects config: Remove unused binfmt container 2017-04-09 10:09:00 +01:00
reports Fix link to Landlock project 2017-04-09 20:06:04 +00:00
scripts Remove some obsolete scripts 2017-04-06 17:57:16 +01:00
src Merge pull request #1521 from thebsdbox/qemu 2017-04-09 13:56:09 +01:00
test Update to new init container with mount changes 2017-04-09 13:52:45 +01:00
tools tools: rename mkimage-gce to mkimage-gcp 2017-04-06 16:59:57 +01:00
vendor vendor: Update the HyperKit go bindings 2017-04-07 10:52:40 +01:00
.gitignore Merge pull request #1476 from riyazdf/make-cleaner 2017-04-04 17:23:12 +01:00
Makefile Change hyperkit-test to test-hyperkit 2017-04-07 19:04:36 -07:00
moby.yml Update to new init container with mount changes 2017-04-09 13:52:45 +01:00
README.md Merge pull request #1534 from justincormack/yaml-doc 2017-04-08 20:05:35 +01:00
vendor.conf vendor: Update the HyperKit go bindings 2017-04-07 10:52:40 +01:00

Moby

Moby, a toolkit for building custom minimal, immutable Linux distributions.

  • Secure defaults without compromising usability
  • Everything is replaceable and customisable
  • Immutable infrastructure applied to building Linux distributions
  • Completely stateless, but persistent storage can be attached
  • Easy tooling, with easy iteration
  • Built with containers, for running containers
  • Designed for building and running clustered applications, including but not limited to container orchestration such as Docker or Kubernetes
  • Designed from the experience of building Docker Editions, but redesigned as a general purpose toolkit
  • Designed to be managed by external tooling, such as Infrakit or similar tools
  • Includes a set of longer term collaborative projects in various stages of development to innovate on kernel and userspace changes, particularly around security

Getting Started

Build the moby tool

Simple build instructions: use make to build. This will build the Moby customisation tool.

If you already have go installed you can use go get -u github.com/docker/moby/src/cmd/moby to install the moby tool, and then use moby build moby.yml to build the example configuration. You can use go get -u github.com/docker/moby/src/cmd/infrakit-instance-hyperkit to get the hyperkit infrakit tool.

Once you have built the tool, use bin/moby build moby.yml to build the example configuration, and bin/moby run moby to run locally. Use halt to terminate on the console.

Build requirements:

  • GNU make
  • GNU or BSD tar (not busybox tar)
  • Docker

Booting and Testing

You can use bin/moby run <name> to execute the image you created with moby build <name>.yml. This will use a suitable backend for your platform or you can choose one, for example VMWare. See moby run --help.

Some platforms do not yet have moby run support, so you can use ./scripts/qemu.sh moby-initrd.img moby-bzImage moby-cmdline or ./scripts/qemu.sh mobylinux-bios.iso which runs qemu in a Docker container.

make test or make hyperkit-test will run the test suite

There are also docs for booting on Google Cloud; ./bin/moby run --gcp <name>.yml should work if you specified a GCP image to be built in the config.

More detailed docs will be available shortly, for running both single hosts and clusters.

Building your own customised image

To customise, copy or modify the moby.yml to your own file.yml or use one of the examples and then run ./bin/moby build file.yml to generate its specified output. You can run the output with ./scripts/qemu.sh or on OSX with ./bin/moby run file. moby run targets will be available for other platforms shortly.

The yaml file specifies a kernel and base init system, a set of containers that are built into the generated image and started at boot time. It also specifies what formats to output, such as bootable ISOs and images for various platforms.

Yaml Specification

The yaml format specifies the image to be built:

  • kernel specifies a kernel Docker image, containing a kernel and a filesystem tarball, eg containing modules. mobylinux/kernel is built from kernel/
  • init is the base init process Docker image, which is unpacked as the base system, containing init, containerd, runc and a few tools. Built from base/init/
  • onboot are the system containers, executed sequentially in order. They should terminate quickly when done.
  • services is the system services, which normally run for the whole time the system is up
  • files are additional files to add to the image
  • outputs are descriptions of what to build, such as ISOs.

For a more detailed overview of the options see yaml documentation.

Architecture

There is an overview of the architecture covering how the system works.

Security design

There is an overview of the security considerations and direction covering the security design of the system.

Roadmap

This project was extensively reworked from the code we are shipping in Docker Editions, and the result is not yet production quality. The plan is to return to production quality during Q2 2017, and rebase the Docker Editions on this open source project.

This is an open project without fixed judgements, open to the community to set the direction. The guiding principles are:

  • Security informs design
  • Infrastructure as code: immutable, manageable with code
  • Sensible secure and well tested defaults
  • An open, pluggable platform for diverse use cases
  • Easy to use and participate in the project
  • Built with containers, for portability and reproducibility
  • Run with system containers, for isolation and extensibility
  • A base for robust products

Development reports

There are weekly development reports summarizing work carried out in the week.

FAQ

See FAQ.