Files
linuxkit/examples
Justin Cormack 11b573c6fb Rename "output" to "format"
This was confusing as there is an option to output to a file as well.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-09-01 23:45:25 +01:00
..
2017-08-10 14:58:50 +01:00
2017-08-10 14:58:50 +01:00
2017-09-01 23:45:25 +01:00

Examples of building an image to run on LinuxKit or on a host

Currently the moby tool can output formats suitable for LinuxKit to boot on a VM, and also some formats for running natively.

The docker format adds a Dockerfile to the tarball and expects a similar file structure to LinuxKit but with the low level system setup pieces removed as this will already be set up in a container.

The mobytest/init-container image in this repository has an example setup that initialises containerd in exactly the same way as it runs in LinuxKit, which will then start the onboot and service containers. The example below shows how you can run nginx on either of these base configs.

moby build -format docker -o - docker.yml nginx.yml | docker build -t dockertest -
docker run -d -p 80:80 --privileged dockertest

moby build -format kernel+initrd linuxkit.yml nginx.yml
linuxkit run nginx

Both of these will run the same nginx either in a VM or a container.