This repository contains the source code for the unikernel demo presented at DockerCon EU 2015.
genisoimage
and makefs
need to be installed
on the host in order to generate the filesystems used by the unikernels. On
Debian, apt-get install genisoimage makefs
is sufficient.docker-unikernel
requires root access in order to be able to plumb
networking into the unikernel/KVM container.macvtap.patch
from this repository. (See
Known issues below)make pull
. This pulls mato/rumprun-packages-hw-x86_64
which will take a
while. This image contains the prebuilt rumprun unikernels for mysql, nginx
and php.make
. This builds the unikernel containers.make rundns
. Runs a DNS server on docker0, using mgood/resolvable
.sudo ./docker-unikernel run -P --hostname nginx unikernel/nginx
.http://nginx/
.This will start a container with an Nginx unikernel, serving static files.
The following unikernels were shown in the DockerCon demo:
mysql
: A MySQL unikernel.nginx-nibbleblog
, php-nibbleblog
: The Nginx+PHP unikernel cluster running
Nibbleblog.To run these, see demo.sh
. After running unicluster_run
, if you browse to
http://blog/
you will get the Nibbleblog install page.
In addition to the unikernels shown in the DockerCon demo, this repository also includes some extra unikernels which we did not have time to show:
Run with sudo ./docker-unikernel run -P --hostname nginx unikernel/nginx
and
browse to http://nginx/
. This shows a standalone Nginx unikernel serving
static files. Browse to http://nginx/root/
for extra fun!
Run with:
sudo ./docker-unikernel run --hostname php unikernel/php
sudo ./docker-unikernel run -P --hostname nginx-fastcgi unikernel/nginx-fastcgi
Browse to http://nginx-fastcgi/
. This shows a simplest possible PHP example,
with phpinfo().
docker-unikernel
on a single host. There is a tentative
workaround in macvtap.patch
, refer there if feeling brave.