Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Mount types

Tip

For an introduction to mounts, see the MOUNT referrence.

When running containers, Raptor supports mounting various file resources into the container namespace.

In the simplest form, this means presenting a directory from the host environment, at a specified location in the container.

This is equivalent to how Docker uses volume mounts (-v / --volume).

However, Raptor supports more than just mounting directories:

TypeDescriptionAccess
MOUNT --simple ...Mounts a directory from the host (default)Read/write
MOUNT --file ...Mounts a single file from the hostRead/write
MOUNT --layers ...Mounts a view of set of layers as directoriesRead-only
MOUNT --overlay ...Mounts a view of the sum of a set of layersRead-only

Tip

If no mount type is specified, --simple is implied as the default.

For clarity, it is recommended to always specify a mount type.

Read more about the specific mount types:

Options

All mount types take two optional arguments:

ArgumentDescription
--readonlyMount the file or directory read-only.
(for --layers/--overlay this is always implied).
--readwriteMount the file or directory read-write.
(for --layers/--overlay this is invalid).
--optionalAllow starting the container, even if this mount is not specified.
--requiredDeny starting the container, unless this mount is specified.

Examples

# Both options can be combined:
MOUNT --readonly --optional --simple input /input

# Optional layers mount:
MOUNT --optional --layers input /data

# Later --required overrides previous --optional:
MOUNT --optional --required --layers input /data