diff --git a/config-linux.md b/config-linux.md index 404072f7b..9a1f50333 100644 --- a/config-linux.md +++ b/config-linux.md @@ -3,20 +3,6 @@ This document describes the schema for the [Linux-specific section](config.md#platform-specific-configuration) of the [container configuration](config.md). The Linux container specification uses various kernel features like namespaces, cgroups, capabilities, LSM, and filesystem jails to fulfill the spec. -## Default Filesystems - -The Linux ABI includes both syscalls and several special file paths. -Applications expecting a Linux environment will very likely expect these file paths to be setup correctly. - -The following filesystems SHOULD be made available in each container's filesystem: - -| Path | Type | -| -------- | ------ | -| /proc | [procfs](https://www.kernel.org/doc/Documentation/filesystems/proc.txt) | -| /sys | [sysfs](https://www.kernel.org/doc/Documentation/filesystems/sysfs.txt) | -| /dev/pts | [devpts](https://www.kernel.org/doc/Documentation/filesystems/devpts.txt) | -| /dev/shm | [tmpfs](https://www.kernel.org/doc/Documentation/filesystems/tmpfs.txt) | - ## Namespaces A namespace wraps a global system resource in an abstraction that makes it appear to the processes within the namespace that they have their own isolated instance of the global resource. diff --git a/config.md b/config.md index 8925318e1..5419b1e10 100644 --- a/config.md +++ b/config.md @@ -63,19 +63,48 @@ For Solaris, the mounts corresponds to fs resource in zonecfg(8). ### Example (Linux) +## Common Linux Filesystems + +The Linux ABI includes both syscalls and several special file paths. +Applications expecting a Linux environment will very likely expect these file paths to be setup correctly. +Configuration authors interested in providing common filesystems can consider entries like: + ```json "mounts": [ { - "destination": "/tmp", + "destination": "/proc", + "type": "proc", + "source": "proc" + }, + { + "destination": "/dev", "type": "tmpfs", "source": "tmpfs", - "options": ["nosuid","strictatime","mode=755","size=65536k"] + "options": ["nosuid", "strictatime", "mode=755", "size=65536k"] + }, + { + "destination": "/dev/pts", + "type": "devpts", + "source": "devpts", + "options": ["nosuid", "noexec", "newinstance", "ptmxmode=0666", "mode=0620", "gid=5"] + }, + { + "destination": "/dev/shm", + "type": "tmpfs", + "source": "shm", + "options": ["nosuid", "noexec", "nodev", "mode=1777", "size=65536k"] + }, + { + "destination": "/dev/mqueue", + "type": "mqueue", + "source": "mqueue", + "options": ["nosuid", "noexec", "nodev"] }, { - "destination": "/data", - "type": "bind", - "source": "/volumes/testing", - "options": ["rbind","rw"] + "destination": "/sys", + "type": "sysfs", + "source": "sysfs", + "options": ["nosuid", "noexec", "nodev", "ro"] } ] ```