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 type --file

This mount type requires that a single file is mounted.

Tip

When running a raptor container with a --file mount, the target file will be created if it does not exist.

Example

Let us expand on the earlier example, to make the file lister provide output to a file.

file-lister-output.rapt

FROM docker://debian:trixie

MOUNT --simple input /input
MOUNT --file output /output

CMD "ls -l /input > /output"

Now that we have named the mounts input and output, we can use the shorthand notation for convenience:

$ sudo raptor run file-lister-output -I /etc -O /tmp/filelist.txt
...
$ sudo cat /tmp/filelist.txt
... <"ls" output would be shown here> ...

The above example would generate a file listing of /etc from the host, and place it in /tmp/filelist.txt. However, the execution of ls takes place in the container.