Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
48 lines (32 sloc) 1.77 KB


Volumes in lithos are just some kind of mount-points. The mount points are not created by lithos itself. So they must exist either in original image. Or on respective volume (if mount point is inside a volume).

There are the following kinds of volumes:

.. volume:: Readonly

    Example: ``!Readonly "/path/to/dir"``

    A **read-only** bind mount for some dir. The directory is mounted with

.. volume:: Persistent

    Example: ``!Persistent { path: /path/to/dir, mkdir: false, mode: 0o700, user: 0, group: 0 }``

    A **writeable** bind mount. The directory is mounted with
    ``rw,nosuid,noexec,nodev``. If you need directory to be created set
    ``mkdir`` to ``true``. You also probably need to customize either the user
    (to the one running command e.g. same as ``user-id`` of the container) or
    the mode (to something like ``0o1777``, i.e. sticky writable by anyone).

.. volume:: Statedir

    Example: ``!Statedir { path: /, mode: 0o700, user: 0, group: 0 }``

    Mount subdir of the container's own state directory. This directory is
    used to store generated ``resolv.conf`` and ``hosts`` files as well as for
    other kinds of small state which is dropped when container dies. If you
    mount something other than ``/`` you should custimize mode or an owner
    similarly to ``!Persistent`` volumes (except that you can't create statedir
    subdirectory by hand because statedir is created for each process at start)

.. volume:: Tmpfs

    Example: ``!Tmpfs { size: 100Mi, mode: 0o766 }``

    The tmpfs mount point. Currently only ``size`` and ``mode`` options
    supported. Note that syntax of size and mode is generic syntax for
    numbers for our configuration library, not the syntax supported by kernel.
You can’t perform that action at this time.