Skip to content

Commit

Permalink
generate: Drop runtime-supplied devices and mounts
Browse files Browse the repository at this point in the history
Since opencontainers/runtime-spec#164 (part of the v0.1.1 release [1]), Linux
runtimes are required to supply these devices and mounts.  Specifying
them explicitly in the config should have no effect, and just makes
the config longer than it needs to be.

[1]: https://github.com/opencontainers/specs/blob/v0.1.1/config-linux.md#default-devices-and-file-systems

Signed-off-by: W. Trevor King <wking@tremily.us>
  • Loading branch information
wking committed Mar 8, 2016
1 parent 07b481e commit 080ee00
Showing 1 changed file with 2 additions and 64 deletions.
66 changes: 2 additions & 64 deletions generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -619,32 +619,7 @@ func getDefaultTemplate() specs.LinuxSpec {
Cwd: "/",
},
Hostname: "shell",
Mounts: []specs.Mount{
{
Destination: "/proc",
Type: "proc",
Source: "proc",
Options: nil,
},
{
Destination: "/dev/pts",
Type: "devpts",
Source: "devpts",
Options: []string{"nosuid", "noexec", "newinstance", "ptmxmode=0666", "mode=0620", "gid=5"},
},
{
Destination: "/dev/shm",
Type: "tmpfs",
Source: "shm",
Options: []string{"nosuid", "noexec", "nodev", "mode=1777", "size=65536k"},
},
{
Destination: "/sys",
Type: "sysfs",
Source: "sysfs",
Options: []string{"nosuid", "noexec", "nodev"},
},
},
Mounts: []specs.Mount{},
},
Linux: specs.Linux{
Capabilities: []string{
Expand Down Expand Up @@ -687,44 +662,7 @@ func getDefaultTemplate() specs.LinuxSpec {
Soft: uint64(1024),
},
},
Devices: []specs.Device{
{
Type: 'c',
Path: "/dev/null",
Major: 1,
Minor: 3,
},
{
Type: 'c',
Path: "/dev/random",
Major: 1,
Minor: 8,
},
{
Type: 'c',
Path: "/dev/full",
Major: 1,
Minor: 7,
},
{
Type: 'c',
Path: "/dev/tty",
Major: 5,
Minor: 0,
},
{
Type: 'c',
Path: "/dev/zero",
Major: 1,
Minor: 5,
},
{
Type: 'c',
Path: "/dev/urandom",
Major: 1,
Minor: 9,
},
},
Devices: []specs.Device{},
},
}

Expand Down

0 comments on commit 080ee00

Please sign in to comment.