A lightweight fully featured OCI runtime and C library for running containers
Switch branches/tags
Nothing to show
Clone or download
giuseppe libocispec: update
Signed-off-by: Giuseppe Scrivano <giuseppe@scrivano.org>
Latest commit 997ee90 Nov 7, 2018
Permalink
Failed to load latest commit information.
build-aux make: add infrastructure for make syntax-check Sep 13, 2017
contrib/terminal-receiver
libocispec @ 8302d57 libocispec: update Nov 7, 2018
m4 initial commit Aug 30, 2017
python libcrun: rename stderr to errfile Jun 13, 2018
rpm rpm: include only the binary Aug 7, 2018
src crun: mass update copyright Oct 12, 2018
tests crun: mass update copyright Oct 12, 2018
.gitmodules .gitmodules: use https instead of ssh Sep 13, 2017
.travis.yml .travis.yml: disable make oci-runtime-validation Mar 22, 2018
COPYING COPYING: new file Aug 31, 2017
COPYING.libcrun libcrun: change license to LGPL3+ Sep 10, 2017
GNUmakefile make: add infrastructure for make syntax-check Sep 13, 2017
Makefile.am Makefile.am: define ACLOCAL_AMFLAGS May 4, 2018
README.md README.md: fix markdown Aug 7, 2018
autogen.sh initial commit Aug 30, 2017
cfg.mk make: add infrastructure for make syntax-check Sep 13, 2017
configure.ac configure.ac: check for argp_parse Jun 14, 2018
maint.mk make: add infrastructure for make syntax-check Sep 13, 2017

README.md

crun

Build Status

A fast and low-memory footprint OCI Container Runtime fully written in C.

crun conforms to the OCI Container Runtime specifications (https://github.com/opencontainers/runtime-spec).

Why another implementation?

While most of the tools used in the Linux containers ecosystem are written in Go, I believe C is a better fit for a lower level tool like a container runtime. runc, the most used implementation of the OCI runtime specs written in Go, re-execs itself and use a module written in C for setting up the environment before the container process starts.

crun aims to be also usable as a library that can be easily included in programs without requiring an external process for managing OCI containers.

Performance

crun is slightly faster than runc and has a much lower memory footprint.

On my machine, this is the elapsed time for running sequentially 100 containers that runs /bin/true:

crun runc %
100 /bin/true (no network namespace) 0m4.449s 0m7.514s 40.7%
100 /bin/true (new network namespace) 0m15.850s 0m18.986s 16.5%

Build

On Fedora these dependencies are required for the build:

$ dnf install -y python git gcc automake autoconf libcap-devel \
    systemd-devel yajl-devel libseccomp-devel libselinux-devel \
    glibc-static python3-libmount libtool

Unless you are also building the Python bindings, Python is needed only by libocispec to generate the C parser at build time, it won't be used afterwards.

Once all the dependencies are installed:

$ ./autogen.sh && ./configure
$ make
$ sudo make install