Add cgroup fs by default

Docker defaults to mounting the cgroup file system.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #53
Approved by: mheon
This commit is contained in:
Daniel J Walsh
2017-11-20 16:33:54 -05:00
committed by Atomic Bot
parent e1311ea722
commit b4bc7b8828

View File

@ -55,6 +55,7 @@ func setupCapabilities(config *createConfig, configSpec *spec.Spec) error {
// Parses information needed to create a container into an OCI runtime spec
func createConfigToOCISpec(config *createConfig) (*spec.Spec, error) {
g := generate.New()
g.AddCgroupsMount("ro")
g.SetProcessCwd(config.workDir)
g.SetProcessArgs(config.command)
g.SetProcessTerminal(config.tty)