Files
runc/runtime-config.md
T
W. Trevor King 713d98102c runtime-config: Remove 'destination' docs from mounts
c18c283 (Change layout of mountpoints and mounts, 2015-09-02, #136)
removed the destination field from the Go type and examples, but
forgot to remove it from the documentation [1].  Fix that with this
commit.

[1]: https://github.com/opencontainers/specs/issues/109#issuecomment-138531616

Reported-by: 梁辰晔 (Liang Chenye) <liangchenye@huawei.com>
Signed-off-by: W. Trevor King <wking@tremily.us>
2015-09-09 09:45:11 -07:00

1.9 KiB

Mount Configuration

Additional filesystems can be declared as "mounts", specified in the mounts object. Keys in this object are names of mount points from portable config. Values are objects with configuration of mount points. The parameters are similar to the ones in the Linux mount system call. Only mounts from the portable config will be mounted.

  • type (string, required) Linux, filesystemtype argument supported by the kernel are listed in /proc/filesystems (e.g., "minix", "ext2", "ext3", "jfs", "xfs", "reiserfs", "msdos", "proc", "nfs", "iso9660"). Windows: ntfs
  • source (string, required) a device name, but can also be a directory name or a dummy. Windows, the volume name that is the target of the mount point. \?\Volume{GUID}\ (on Windows source is called target)
  • options (list of strings, optional) in the fstab format https://wiki.archlinux.org/index.php/Fstab.

Example (Linux)

"mounts": {
    "proc": {
        "type": "proc",
        "source": "proc",
        "options": []
    },
    "dev": {
        "type": "tmpfs",
        "source": "tmpfs",
        "options": ["nosuid","strictatime","mode=755","size=65536k"]
    },
    "devpts": {
        "type": "devpts",
        "source": "devpts",
        "options": ["nosuid","noexec","newinstance","ptmxmode=0666","mode=0620","gid=5"]
    },
    "data": {
        "type": "bind",
        "source": "/volumes/testing",
        "options": ["rbind","rw"]
    }
}

Example (Windows)

"mounts": {
    "myfancymountpoint": {
        "type": "ntfs",
        "source": "\\\\?\\Volume\\{2eca078d-5cbc-43d3-aff8-7e8511f60d0e}\\",
        "options": []
    }
}

See links for details about mountvol and SetVolumeMountPoint in Windows.