Bind mounts
Bind mounts allow binding a file or a directory and its contents from the parent host into an enclave. This page describes the steps required to setup a bind mount.
Set up the bind mount on the parent host. In this example, you will bind the directory /home
to the enclave:
First, set /home
as the root bind directory.
$ anjuna-fs-proxy --daemonize --anjunafs-rootdir /home
Then, create a directory enclave-data
to bind to the enclave.
$ mkdir -p /home/enclave-data
Create an enclave configuration file with that bind mount:
version: 1.7
# define volume mounts for this enclave
mounts:
# name of the bind mapping
# host must include a file or directory with the same name inside rootdir
- name: enclave-data
# 'basic' is the bind mount type
type: basic
# path to mount to inside the enclave
mountPath: /shared/enclave-data
In this example, the parent host mounted the directory /home/enclave-data
to /shared/enclave-data
inside the enclave.