Enroot container images are standard squashfs images with the following configuration files influencing the container runtime behavior:
| File | Description |
|---|---|
/etc/rc |
Command script of the container (entrypoint) |
/etc/fstab |
Mount configuration of the container |
/etc/environment |
Environment of the container |
These files follow the same format as the standard Linux/Unix ones (see fstab(5), rc(8), pam_env(8)) with the exceptions listed below.
-
/etc/rc:- The command and arguments of the start command are passed as input parameters.
-
/etc/fstab:- The target mountpoint is relative to the container rootfs.
- Allows some fields to be omitted where it makes sense, for example
/proc /proc rbindortmpfs /tmpare valid fstab entries. - Adds the mount options
x-create=dir,x-create=fileandx-create=autoto create an empty directory or file before performing the mount. - Adds the mount options
x-moveandx-detachto move or detach a mountpoint respectively. - References to environment variables from the host of the form
${ENVVAR}will be substituted. - The
fs_freqfield is ignored and thefs_passnois instead used to specify a specific mount order.
# Example mounting the current working directory from the host inside the container
${PWD} /mnt none x-create=dir,bind/etc/environment:- References to environment variables from the host of the form
${ENVVAR}will be substituted.
- References to environment variables from the host of the form
# Example preserving the DISPLAY environment variable from the host
DISPLAY=${DISPLAY}